Class ShellObject
- Namespace
- Microsoft.WindowsAPICodePack.Shell
- Assembly
- Microsoft.WindowsAPICodePack.Shell.dll
The base class for all Shell objects in Shell Namespace.
public abstract class ShellObject : IDisposable, IEquatable<ShellObject>
- Inheritance
-
ShellObject
- Implements
- Derived
- Inherited Members
Properties
IsFileSystemObject
Gets a value that determines if this ShellObject is a file system object.
public bool IsFileSystemObject { get; }
Property Value
IsLink
Gets a value that determines if this ShellObject is a link or shortcut.
public bool IsLink { get; }
Property Value
IsPlatformSupported
Indicates whether this feature is supported on the current platform.
public static bool IsPlatformSupported { get; }
Property Value
Name
Gets the normal display for this ShellItem.
public virtual string Name { get; protected set; }
Property Value
Parent
Gets the parent ShellObject. Returns null if the object has no parent, i.e. if this object is the Desktop folder.
public ShellObject Parent { get; }
Property Value
ParsingName
Gets the parsing name for this ShellItem.
public virtual string ParsingName { get; protected set; }
Property Value
Properties
Gets an object that allows the manipulation of ShellProperties for this shell item.
public ShellProperties Properties { get; }
Property Value
Thumbnail
Gets the thumbnail of the ShellObject.
public ShellThumbnail Thumbnail { get; }
Property Value
Methods
Dispose()
Release the native objects.
public void Dispose()
Dispose(bool)
Release the native and managed objects
protected virtual void Dispose(bool disposing)
Parameters
disposing
boolIndicates that this is being called from Dispose(), rather than the finalizer.
Equals(ShellObject)
Determines if two ShellObjects are identical.
public bool Equals(ShellObject other)
Parameters
other
ShellObjectThe ShellObject to comare this one to.
Returns
- bool
True if the ShellObjects are equal, false otherwise.
Equals(object)
Returns whether this object is equal to another.
public override bool Equals(object obj)
Parameters
obj
objectThe object to compare against.
Returns
- bool
Equality result.
~ShellObject()
Implement the finalizer.
protected ~ShellObject()
FromParsingName(string)
Creates a ShellObject subclass given a parsing name. For file system items, this method will only accept absolute paths.
public static ShellObject FromParsingName(string parsingName)
Parameters
parsingName
stringThe parsing name of the object.
Returns
- ShellObject
A newly constructed ShellObject object.
GetDisplayName(DisplayNameType)
Returns the display name of the ShellFolder object. DisplayNameType represents one of the values that indicates how the name should look. See DisplayNameType for a list of possible values.
public virtual string GetDisplayName(DisplayNameType displayNameType)
Parameters
displayNameType
DisplayNameTypeA disaply name type.
Returns
- string
A string.
GetHashCode()
Returns the hash code of the object.
public override int GetHashCode()
Returns
ToString()
Overrides object.ToString()
public override string ToString()
Returns
- string
A string representation of the object.
Update(IBindCtx)
Updates the native shell item that maps to this shell object. This is necessary when the shell item changes after the shell object has been created. Without this method call, the retrieval of properties will return stale data.
public void Update(IBindCtx bindContext)
Parameters
bindContext
IBindCtxBind context object
Operators
operator ==(ShellObject, ShellObject)
Implements the == (equality) operator.
public static bool operator ==(ShellObject leftShellObject, ShellObject rightShellObject)
Parameters
leftShellObject
ShellObjectFirst object to compare.
rightShellObject
ShellObjectSecond object to compare.
Returns
- bool
True if leftShellObject equals rightShellObject; false otherwise.
operator !=(ShellObject, ShellObject)
Implements the != (inequality) operator.
public static bool operator !=(ShellObject leftShellObject, ShellObject rightShellObject)
Parameters
leftShellObject
ShellObjectFirst object to compare.
rightShellObject
ShellObjectSecond object to compare.
Returns
- bool
True if leftShellObject does not equal leftShellObject; false otherwise.