C# Class Glyma.SharePoint.Common.SPWebExtensions

Provides extension methods for a SharePoint site.
Afficher le fichier Open project: chris-tomich/Glyma

Méthodes publiques

Méthode Description
EnsureList ( this site, ListDetails listDetail, bool &isNewList ) : SPList

Checks if a list exists in a site using its "internal name" and creates it if it doesn't exist.

EnsureList ( this site, ReadOnlyListDetails listDetail, bool &isNewList ) : SPList

Checks if a list exists in a site using its "internal name" and creates it if it doesn't exist.

EnsureList ( this site, string listUrlName, SPListTemplateType listTemplateType, string listTitle, string listDescription, bool &isNewList ) : SPList

Checks if a list exists in a site using its "internal name" and creates it if it doesn't exist.

EnsureSiteColumn ( this site, ColumnDetails columnDetail, bool &isNewColumn ) : SPField

Checks if a site column exists in a site and creates it if it doesn't exist.

EnsureSiteColumn ( this site, System.Guid columnId, string columnInternalName, string columnDisplayName, string columnDescription, SPFieldType columnType, string columnTypeAsString, string columnGroup, bool &isNewColumn ) : SPField

Checks if a site column exists in a site and creates it if it doesn't exist.

EnsureSiteColumn ( this site, System.Guid columnId, string columnInternalName, string columnDisplayName, string columnDescription, SPFieldType columnType, string columnChoices, string columnTypeAsString, string columnGroup, bool &isNewColumn ) : SPField

Checks if a site column exists in a site and creates it if it doesn't exist.

EnsureSiteColumn ( this site, ReadOnlyColumnDetails columnDetail, bool &isNewColumn ) : SPField

Checks if a site column exists in a site and creates it if it doesn't exist.

GetListUrlPrefix ( this site ) : string

Returns the server relative URL prefix for lists within a site.

GetServerRelativeListUrlPrefix ( this site ) : string

Returns the server relative URL prefix for lists within a site.

TryGetList ( this site, string serverRelativeUrl ) : SPList

Return a reference to a list within the site using its server-relative URL.

Method Details

EnsureList() public static méthode

Checks if a list exists in a site using its "internal name" and creates it if it doesn't exist.
public static EnsureList ( this site, ListDetails listDetail, bool &isNewList ) : SPList
site this The site to check.
listDetail ListDetails The details of the list.
isNewList bool A boolean that is set to true, if a new list is created; otherwise, it is set to false.
Résultat SPList

EnsureList() public static méthode

Checks if a list exists in a site using its "internal name" and creates it if it doesn't exist.
public static EnsureList ( this site, ReadOnlyListDetails listDetail, bool &isNewList ) : SPList
site this The site to check.
listDetail ReadOnlyListDetails The details of the list.
isNewList bool A boolean that is set to true, if a new list is created; otherwise, it is set to false.
Résultat SPList

EnsureList() public static méthode

Checks if a list exists in a site using its "internal name" and creates it if it doesn't exist.
public static EnsureList ( this site, string listUrlName, SPListTemplateType listTemplateType, string listTitle, string listDescription, bool &isNewList ) : SPList
site this The site to check.
listUrlName string The "internal name" of the list to check. This is the name that is used to create the URL for the list.
listTemplateType SPListTemplateType A SPListTemplateType object specifying the type of list to create if it needs to be created.
listTitle string The display name of the list to use if it needs to be created.
listDescription string The description of the list to be used if it needs to be created.
isNewList bool A boolean that is set to true, if a new list is created; otherwise, it is set to false.
Résultat SPList

EnsureSiteColumn() public static méthode

Checks if a site column exists in a site and creates it if it doesn't exist.
public static EnsureSiteColumn ( this site, ColumnDetails columnDetail, bool &isNewColumn ) : SPField
site this The site to check.
columnDetail ColumnDetails The details of the site column.
isNewColumn bool A boolean that is set to true, if a new column is created; otherwise, it is set to false.
Résultat SPField

EnsureSiteColumn() public static méthode

Checks if a site column exists in a site and creates it if it doesn't exist.
public static EnsureSiteColumn ( this site, System.Guid columnId, string columnInternalName, string columnDisplayName, string columnDescription, SPFieldType columnType, string columnTypeAsString, string columnGroup, bool &isNewColumn ) : SPField
site this The site to check.
columnId System.Guid The GUID of the column to use if it needs to be created.
columnInternalName string The internal name of the column to check.
columnDisplayName string The display name of the column to use if it needs to be created.
columnDescription string The description of the column to use if it needs to be created.
columnType SPFieldType
columnTypeAsString string
columnGroup string The column group to add the site column to if it needs to be created.
isNewColumn bool A boolean that is set to true, if a new column is created; otherwise, it is set to false.
Résultat SPField

EnsureSiteColumn() public static méthode

Checks if a site column exists in a site and creates it if it doesn't exist.
public static EnsureSiteColumn ( this site, System.Guid columnId, string columnInternalName, string columnDisplayName, string columnDescription, SPFieldType columnType, string columnChoices, string columnTypeAsString, string columnGroup, bool &isNewColumn ) : SPField
site this The site to check.
columnId System.Guid The GUID of the column to use if it needs to be created.
columnInternalName string The internal name of the column to check.
columnDisplayName string The display name of the column to use if it needs to be created.
columnDescription string The description of the column to use if it needs to be created.
columnType SPFieldType The type of the column
columnChoices string If the type of the column is choice this is the xml to put in the choices
columnTypeAsString string
columnGroup string The column group to add the site column to if it needs to be created.
isNewColumn bool A boolean that is set to true, if a new column is created; otherwise, it is set to false.
Résultat SPField

EnsureSiteColumn() public static méthode

Checks if a site column exists in a site and creates it if it doesn't exist.
public static EnsureSiteColumn ( this site, ReadOnlyColumnDetails columnDetail, bool &isNewColumn ) : SPField
site this The site to check.
columnDetail ReadOnlyColumnDetails The details of the site column.
isNewColumn bool A boolean that is set to true, if a new column is created; otherwise, it is set to false.
Résultat SPField

GetListUrlPrefix() public static méthode

Returns the server relative URL prefix for lists within a site.
public static GetListUrlPrefix ( this site ) : string
site this The site to use.
Résultat string

GetServerRelativeListUrlPrefix() public static méthode

Returns the server relative URL prefix for lists within a site.
public static GetServerRelativeListUrlPrefix ( this site ) : string
site this The site to use.
Résultat string

TryGetList() public static méthode

Return a reference to a list within the site using its server-relative URL.
public static TryGetList ( this site, string serverRelativeUrl ) : SPList
site this The site to retrieve the list from.
serverRelativeUrl string The server relative URL of the list.
Résultat SPList