如果使用Reflector,可以在Microsoft.SharePoint.Administration.SPConstants文件中,发现很多SharePoint定义的常量,下面是一些常用的常量定义,可以作为开发时的参考(这些只是SharePoint 2010版本,SharePoint 2013要多很多),有很多可以根据名字猜出来其作用,有些不那么明显,今后如果遇到知道确切意思的,会把注释加进来。
internal static readonly string AdminObjectName;
internal static readonly string AdminServerLocationName;
internal static string AdminServiceName;
internal static readonly string AdminSiteName;
internal static readonly string AdminSiteNamePreviousVersion;
internal static readonly string AdminWorkerProcessGroupName;
internal const int AllowedMinimumItemsPerThrottledOperation = 0x7d0; //2000
internal static readonly string AllUnassignedWebSiteHostName;
internal static readonly string ApplicationCredentialKeyName;
internal static readonly string ApplicationCredentialValueName;
internal const string ApplicationName = "Microsoft SharePoint Foundation";
internal const string ApplicationNameShort = "SharePoint Foundation";
internal const string ApplicationVersion = "2010";
internal const string BrowserCEIPEnabledProperty = "BrowserCEIPEnabled";
internal const string BrowserUserAgent = "Mozilla";
internal static string CachedProvisioningSPSite;
internal const string CellStorageUrlForUsageLogging = "CellStorageUrlForUsageLogging";
internal static readonly string CentralAdministrationURLValueName;
internal const int CharsetEncodingMaxLength = 0x80; //128
internal const int ClassGuidsOutOfSync = 0xc3b9; //50105
internal const int CoauthoringMaxAuthors = 0x63; //99 最大协同作者数
internal const int CoauthoringMinAuthors = 2; //2 最小协同作者数
internal static readonly string ConfigDbDsn2ValueName;
internal static readonly string ConfigDbDsnValueName;
internal static readonly string ConfigDbIdValueName;
internal static readonly string ConfigDbKeyName;
internal static readonly int ConnectionStringMaxLength;
internal static readonly string ContentApplicationSqlRole;
internal const string CredentialValueName = "CredentialKeyDPEnt";
internal const string CredentialValueNameNoEntropy = "CredentialKeyDP";
internal const string CredentialValueNameOld = "CredentialKey";
internal const string CurrentThreadUserLoginKey = "SPThreadContext.UserLogin";
internal const int DatabaseCapacityError = 0xc355;
internal static readonly string DatabaseCollation;
internal const string DatabaseOwnerRole = "db_owner";
internal static readonly string DefaultAdminContentDbName;
internal const int DefaultCascadeDeleteMaximumItemLimit = 0x3e8; //1000
internal const int DefaultCascadeDeleteTimeoutMultiplier = 120;
internal const int DefaultCoauthoringVersionPeriod = 30;
internal const int DefaultDaysBeforeChangeToEmail = 5;
internal const int DefaultDaysBeforeExpiryToChangePassword = 2;
internal const int DefaultDaysBeforePasswordExpirationToSendEmail = 10;
internal const string DefaultFormTemplate = "ListForm";
internal static string DefaultLocalObjectName;
internal const int DefaultMaximumQueryLookupFields = 8;
internal const int DefaultMaxItemsPerThrottledOperation = 0x1388; //50000 默认item操作阙值
internal const int DefaultMaxItemsPerThrottledOperationOverride = 0x4e20; //20000默认最大的item操作阙值
internal const int DefaultMaxListItemRowStorage = 6;
internal const int DefaultMaxTriesToChangePassword = 5;
internal const int DefaultPasswordChangeGuardTime = 0x2d;
internal const int DefaultScriptCommandTimeout = 300;
internal const int DefaultSMTPTimeoutInSeconds = 90; //90 SMTP超时时间
internal const int DefaultSqlCommandTimeout = 0;
internal const int DefaultTokenTimeOutInMinutes = 0x5a0;
internal const uint DefaultUnThrottleWindowStartHour = 0x16;
internal const double DefaultWarningAndMaximumRatio = 0.6;
internal const int DefaultWarningListItems = 0xbb8;
internal const int DefaultWorkItemBatchSize = 100; //100 一次批处理workitem的数量
internal const int DefaultWorkItemThrottle = 0;
internal static readonly string DelegatedAdministratorsGroupId;
internal const int DeletedConcurrencyError = 0xc352;
internal static readonly int DisplayNameMaxLength;
internal const int DuplicateCustomUrlError = 0xc3b8;
internal const int DuplicateExtranetUrlError = 0xc3b7;
internal const int DuplicateIntranetUrlError = 0xc3b6;
internal const int DuplicateNoZoneUrlError = 0xc3b5;
internal static readonly string EmptyGuidArgumentExceptionMessage;
internal const string EndpointPathAndQuery = "Microsoft.SharePoint.Linq.DataService.OriginalPathAndQuery";
internal static readonly string FarmAdminGroupName;
internal static readonly string FarmAdministratorsGroupId;
internal static readonly string FarmAdminKeyName;
internal const string FarmPasswordKey = "WSSFarmPassword";
internal const string FarmUserKey = "WSSFarmUser";
internal const long FeatureCacheHighWaterMark = 0xa00000L;
internal const long FeatureCacheLowWaterMark = 0x500000L;
internal const int FeatureCacheTrimInterval = 0x2bf20;
internal const int FileReadChunkSize = 0x19000;
internal const string HttpSessionStateIdKey = "HttpSessionState.SessionID";
internal static string IisApplicationPoolSchemaClassName;
internal static string IisFilterSchemaClassName;
internal const string IisInstanceIdKey = "INSTANCE_ID";
internal static string IisVirtualDirectorySchemaClassName;
internal static string IisWebFileSchemaClassName;
internal static string IisWebSiteSchemaClassName;
internal const int InvalidIisInstanceId = -1;
internal static readonly string InvalidObjectIdArgumentExceptionMessage;
internal static readonly int InvalidRowVersion;
internal const int InvalidZoneId = -1;
internal const int LargeFileSQLSize = 0x500000;
internal const int LargeObjectCLRSize = 0x13a10;
internal const string LogonUserIisServerVariable = "LOGON_USER";
internal static readonly int MailAddressMaxLength;
internal const int MappedUrlPrefixMaxLength = 0x100;
internal static int MaxDependenciesPerObject;
internal static readonly int MaxFileAccessAttempts;
internal static readonly int MaxFileAccessDelay;
internal static readonly int MaximumSiteLength;
internal const int MaxTPTextLength = 0xff;
internal const string NoRibbonRenderProperty = "x-noribbon";
internal const int NotLockOwnerError = 0xc354;
internal static string NullTypeValue;
internal static readonly int ObjectTableColumns;
internal static readonly string[] OfficeClientUserAgents;
internal const string PermissionsRegistryName = "Permissions";
internal static readonly int PersistedObjectNameMaxLength;
internal const string QueryStringIisServerVariable = "QUERY_STRING";
internal static readonly string RequestFromAdminPort;
internal const string RequestFromAstoria = "Microsoft.SharePoint.Linq.DataService";
internal static readonly string RequestGuid;
internal const string ResourceNameRegistryName = "ResourceName";
internal const string ResourceTypeRegistryName = "ResourceType";
internal static string SearchProviderNamePropertyName;
internal const string SecurityGroupRegistryName = "SecurityGroup";
internal const string SecurityRegistryKeyName = "ResourcesToSecure";
internal static string SerializedFieldElement;
internal static string SerializedFieldName;
internal static string SerializedFieldType;
internal static string SerializedFieldValue;
internal static string SerializedObjectElement;
internal static string SerializedSystemFieldElement;
internal static readonly int ServerAddressMaxLength;
internal static readonly string ServerCollationPart1;
internal static readonly string ServerCollationPart2;
internal static readonly string ServerIdValueName;
internal static readonly string ServiceConfigurationInUseExceptionMessage;
internal static readonly int ServiceInstanceMaxLength;
internal static readonly string SharePointConfigurationKeyName;
internal static readonly string SharePointDefaultWebAppName;
internal static readonly string SharePointErrorHeader;
internal static readonly string ShellAccessRole;
internal const string SingleBoxOnlyRegistryName = "SingleBoxOnly";
internal const string SiteCollectionPlaceHolder = "~sitecollection";
internal static readonly int SiteNameMaxLength;
internal static readonly int SitePathMaxLength;
internal const string SitePlaceHolder = "~site";
internal const int SqlDatabaseNameMaxLength = 0x80;
internal const int SQLLockEscalateLimit = 0x1194;
internal const int SqlLoginMaxLength = 0x80;
internal const int SqlPasswordMaxLength = 0x80;
internal const int SqlServerAndInstanceMaxLength = 0x87;
internal const int TimerDatabaseNameMaxLength = 0x80;
internal const int TimerErrorMessageMaxLength = 0x3e8;
internal const int TimerJobNameMaxLength = 0xff;
internal static string TimerServiceName;
internal static string TimerServiceNamePreviousVersion;
internal const int TimerWebAppNameMaxLength = 0xff;
internal static string TraceServiceName;
internal const int UpdatedConcurrencyError = 0xc353;
internal static readonly int UrlMaxLength;
internal static string UserCodeServiceName;
internal const string V2PropertiesKey = "V2Properties";
internal const string V2UsedHostHeaderModeKey = "V2UsedHostHeaderMode";
internal static readonly int VersionMaxLength;
internal static readonly string VersionName;
internal const int VServerFriendlyNameMaxLength = 0x40;
internal static string VssWriterServiceName;
internal static readonly string vtiBuildVersionFormat;
internal static readonly string vtiEncoding;
internal static readonly string vtiMetadictFormat;
internal const string WMSDEInstanceName = "Sharepoint";
internal static readonly string WorkerProcessGroupName;
internal const int WorkflowCPUThrottle = 70;
internal const int WorkflowEventDeliveryBatchSize = 100;
internal const int WorkflowEventDeliveryThrottle = 15;
internal const int WorkflowTimeoutMinutes = 5;
internal const string WSSRootRegistryKey = @"Software\Microsoft\Shared Tools\Web Server Extensions\14.0\WSS";
internal const string WYukonDataSource = @"np:\\.\pipe\MSSQL$Microsoft##SSEE\sql\query";
internal const string WYukonInstanceName = "Microsoft##SSEE";
internal static readonly Version YukonProductVersion;
internal const int ZoneMaxValue = 4;