Class FolderId
- Namespace
- Microsoft.Exchange.WebServices.Data
- Assembly
- Microsoft.Exchange.WebServices.dll
Represents the Id of a folder.
public sealed class FolderId : ServiceId
- Inheritance
-
FolderId
- Inherited Members
Constructors
FolderId(WellKnownFolderName)
Initializes a new instance of the FolderId class. Use this constructor to link this FolderId to a well known folder (e.g. Inbox, Calendar or Contacts).
public FolderId(WellKnownFolderName folderName)
Parameters
folderName
WellKnownFolderNameThe folder name used to initialize the FolderId.
FolderId(WellKnownFolderName, Mailbox)
Initializes a new instance of the FolderId class. Use this constructor to link this FolderId to a well known folder (e.g. Inbox, Calendar or Contacts) in a specific mailbox.
public FolderId(WellKnownFolderName folderName, Mailbox mailbox)
Parameters
folderName
WellKnownFolderNameThe folder name used to initialize the FolderId.
mailbox
MailboxThe mailbox used to initialize the FolderId.
FolderId(string)
Initializes a new instance of the FolderId class. Use this constructor to link this FolderId to an existing folder that you have the unique Id of.
public FolderId(string uniqueId)
Parameters
uniqueId
stringThe unique Id used to initialize the FolderId.
Properties
FolderName
Gets the name of the folder associated with the folder Id. Name and Id are mutually exclusive; if one is set, the other is null.
public WellKnownFolderName? FolderName { get; }
Property Value
Mailbox
Gets the mailbox of the folder. Mailbox is only set when FolderName is set.
public Mailbox Mailbox { get; }
Property Value
Methods
Equals(object)
public override bool Equals(object obj)
Parameters
Returns
Exceptions
- NullReferenceException
The
obj
parameter is null.
GetHashCode()
Serves as a hash function for a particular type.
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
implicit operator FolderId(WellKnownFolderName)
Defines an implicit conversion between WellKnownFolderName and FolderId.
public static implicit operator FolderId(WellKnownFolderName folderName)
Parameters
folderName
WellKnownFolderNameThe folder name to convert to FolderId.
Returns
- FolderId
A FolderId initialized with the specified folder name.
implicit operator FolderId(string)
Defines an implicit conversion between string and FolderId.
public static implicit operator FolderId(string uniqueId)
Parameters
uniqueId
stringThe unique Id to convert to FolderId.
Returns
- FolderId
A FolderId initialized with the specified unique Id.