AddWithWellKnownFolder method

FolderId AddWithWellKnownFolder(
  1. WellKnownFolderName folderName
)
Adds a well-known folder to the collection. The well known folder to add.

Implementation

FolderId AddWithWellKnownFolder(WellKnownFolderName folderName) {
  if (this.contains(folderName)) {
    throw new ArgumentException("IdAlreadyInList($folderName");
  }

  FolderId folderId = new FolderId.fromWellKnownFolder(folderName);

  this.InternalAdd(folderId);

  return folderId;
}