次の方法で共有


SPSiteCollection members

Represents a collection of SPSite objects or site collections that are associated with a particular Web application, including a top-level Web site and all its sub-sites. Each SPSite object, or site collection, is represented within an SPSiteCollection objects that consists of the collection of all site collections in the Web application.

The SPSiteCollection type exposes the following members.

Properties

  Name Description
Public property Count Gets the number of SPSite objects in the collection. (Overrides SPBaseCollection.Count.)
Public property Item[Int32] Gets the SPSite object at the specified index in the collection. In C#, this property is an indexer for the SPSiteCollection class.
Public property Item[String] Gets the SPSite object at the specified server-relative URL in the collection.
Public property Names Gets the server-relative URLs of all the SPSite objects in the collection.
Public property UpgradedPersistedProperties Gets the collection of field names and values for fields that were deleted or changed. (Inherited from SPAutoSerializingObject.)
Public property VirtualServer Obsolete. Gets the parent virtual server for the site collection.
Public property WebApplication Gets the Web application in which site collections within this collection are stored.

Top

Methods

  Name Description
Public method Add(SPSiteCollectionAddParameters)
Public method Add(String, String, String) Creates an SPSite object based on the specified URL and on the user name and e-mail address of the owner of the site collection.
Public method Add(String, String, String, UInt32, String, String, String, String) Creates an SPSite object in the collection based on the specified URL, title, description, locale identifier (LCID), and site definition or site template, as well as on the user name, user display name, and e-mail address of the owner of the site collection.
Public method Add(String, String, String, UInt32, String, String, String, String, String, String, String) Creates an SPSite object in the collection based on the specified URL, title, description, locale identifier (LCID), and site definition or site template, as well as on the user name, user display name, and e-mail address of the owner of the site collection.
Public method Add(String, String, String, UInt32, Int32, String, String, String, String, String, String, String) Creates an SPSite object in the collection based on the specified URL, title, description, locale identifier (LCID), compatibility level and site definition or site template, as well as on the user names, user display names, and e-mail addresses of both the collection owner and a secondary contact.
Public method Add(String, String, String, UInt32, String, String, String, String, String, String, String, Boolean) Creates an SPSite object in the collection based on the specified URL, title, description, locale identifier (LCID), and site definition or site template, as well as on the user names, user display names, and e-mail addresses of both the collection owner and a secondary contact.
Public method Add(SPSiteSubscription, String, String, String, UInt32, String, String, String, String, String, String, String, Boolean) Creates an SPSite object in the collection based on the specified site subscription, URL, title, description, locale identifier (LCID), and site definition or site template, as well as on the user names, user display names, and e-mail addresses of both the collection owner and a secondary contact.
Public method Add(String, String, String, UInt32, Int32, String, String, String, String, String, String, String, Boolean) Creates an SPSite object in the collection based on the specified URL, title, description, locale identifier (LCID), compatibility level and site definition or site template, as well as on the user names, user display names, and e-mail addresses of both the collection owner and a secondary contact.
Public method Add(SPSiteSubscription, String, String, String, UInt32, Int32, String, String, String, String, String, String, String, Boolean) Creates a new site to a site subscription.
Public method Add(String, String, String, UInt32, String, String, String, String, String, String, String, String, String, String, String) Creates an SPSite object in the collection based on the specified URL, title, description, locale identifier (LCID), and site definition or site template, as well as on the user names, user display names, and e-mail addresses of both the collection owner and a secondary contact, and on the database server, name for the new database, and the user name and password of the database administrator.
Public method Add(SPSiteSubscription, String, String, String, UInt32, String, String, String, String, String, String, String, String, String, String, String) Creates an SPSite object in the collection based on the specified site subscription, URL, title, description, locale identifier (LCID), and site definition or site template, as well as on the user names, user display names, and e-mail addresses of both the collection owner and a secondary contact, and on the database server, name for the new database, and the user name and password of the database administrator.
Public method Add(String, String, String, UInt32, Int32, String, String, String, String, String, String, String, String, String, String, String) Creates a new site in a new content database.
Public method Add(SPSiteSubscription, String, String, String, UInt32, Int32, String, String, String, String, String, String, String, String, String, String, String) Creates a new site in a new content database.
Public method Backup Creates a backup file for the site collection located at the specified URL.
Public method Delete(String) Deletes the specified SPSite object from the collection.
Public method Delete(String, Boolean) Deletes the specified SPSite object from the collection with the option of deleting Active Directory Domain Services accounts that were created for this site collection.
Public method Delete(String, Boolean, Boolean) Deletes the specified SPSite object from the collection with the option of deleting Active Directory Domain Services accounts that were created for this site collection.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetContentDatabaseForSiteCreation
Public method GetHashCode (Inherited from Object.)
Public method GetObjectData Gets the serialized state of the object. (Inherited from SPAutoSerializingObject.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Protected method OnDeserialization Called after the object has been deserialized from the file system cache or the database. (Inherited from SPAutoSerializingObject.)
Public method Restore(String, String, Boolean) Restores the specified SPSite object to the collection.
Public method Restore(String, String, Boolean, Boolean) Restores the specified SPSite object to the collection and specifies whether to use the host header as the name of the site collection.
Public method ToString (Inherited from Object.)
Protected method UpdateParent Causes the containing SPPersistedObject, if one exists, to update its state. (Inherited from SPAutoSerializingObject.)

Top

Explicit interface implementations

  Name Description
Explicit interface implemetationPrivate method IEnumerable<SPSite>.GetEnumerator Returns an enumerator to iterate through the collection.

Top

See also

Reference

SPSiteCollection class

Microsoft.SharePoint.Administration namespace