Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / xsp / System / Web / Configuration / WebPartsPersonalization.cs / 2 / WebPartsPersonalization.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Configuration { using System; using System.Configuration; using System.Collections; using System.Collections.Specialized; using System.Security.Principal; using System.Web; using System.Web.Compilation; using System.Web.Configuration; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.Util; using System.Xml; using System.Security.Permissions; [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class WebPartsPersonalization : ConfigurationElement { private static ConfigurationPropertyCollection _properties; private static readonly ConfigurationProperty _propDefaultProvider = new ConfigurationProperty( "defaultProvider", typeof( string ), "AspNetSqlPersonalizationProvider", null, StdValidatorsAndConverters.NonEmptyStringValidator, ConfigurationPropertyOptions.None ); private static readonly ConfigurationProperty _propProviders = new ConfigurationProperty("providers", typeof(ProviderSettingsCollection), null, ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propAuthorization = new ConfigurationProperty("authorization", typeof(WebPartsPersonalizationAuthorization), null, ConfigurationPropertyOptions.None); static WebPartsPersonalization() { _properties = new ConfigurationPropertyCollection(); _properties.Add(_propDefaultProvider); _properties.Add(_propProviders); _properties.Add(_propAuthorization); } public WebPartsPersonalization() { } [ConfigurationProperty("authorization")] public WebPartsPersonalizationAuthorization Authorization { get { return (WebPartsPersonalizationAuthorization)base[_propAuthorization]; } } [ConfigurationProperty("defaultProvider", DefaultValue = "AspNetSqlPersonalizationProvider")] [StringValidator(MinLength = 1)] public string DefaultProvider { get { return (string)base[_propDefaultProvider]; } set { base[_propDefaultProvider] = value; } } ///protected override ConfigurationPropertyCollection Properties { get { return _properties; } } [ConfigurationProperty("providers")] public ProviderSettingsCollection Providers { get { return (ProviderSettingsCollection)base[_propProviders]; } } internal void ValidateAuthorization() { foreach (AuthorizationRule rule in Authorization.Rules) { StringCollection verbs = rule.Verbs; if (verbs.Count == 0) { throw new ConfigurationErrorsException( SR.GetString(SR.WebPartsSection_NoVerbs), rule.ElementInformation.Properties["verbs"].Source, rule.ElementInformation.Properties["verbs"].LineNumber); } foreach (string verb in verbs) { if (verb != "enterSharedScope" && verb != "modifyState") { throw new ConfigurationErrorsException( SR.GetString(SR.WebPartsSection_InvalidVerb, verb), rule.ElementInformation.Properties["verbs"].Source, rule.ElementInformation.Properties["verbs"].LineNumber); } } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ProfileBuildProvider.cs
- PropertyEmitter.cs
- Compiler.cs
- _CommandStream.cs
- CodeFieldReferenceExpression.cs
- CodeActivityContext.cs
- Helpers.cs
- arabicshape.cs
- FunctionDescription.cs
- AttachedPropertiesService.cs
- HitTestWithPointDrawingContextWalker.cs
- ResourceWriter.cs
- UdpMessageProperty.cs
- GestureRecognitionResult.cs
- SqlMetaData.cs
- TreeView.cs
- BitmapEffectInput.cs
- ButtonChrome.cs
- LinkTarget.cs
- ForAllOperator.cs
- RunInstallerAttribute.cs
- SequenceQuery.cs
- ContentElement.cs
- RectKeyFrameCollection.cs
- MetadataSet.cs
- RestHandler.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- SafeNativeMethods.cs
- Event.cs
- PropertyBuilder.cs
- SByteConverter.cs
- EntityWrapperFactory.cs
- WorkBatch.cs
- _UncName.cs
- ToolTip.cs
- Rect.cs
- SqlUserDefinedTypeAttribute.cs
- Span.cs
- SqlTopReducer.cs
- EventLogInformation.cs
- SafePointer.cs
- Bitmap.cs
- SiteMapNodeItem.cs
- XmlSchemaAppInfo.cs
- HMACMD5.cs
- securestring.cs
- HtmlTableCell.cs
- UnsafeNativeMethodsCLR.cs
- MenuItemStyleCollection.cs
- SchemaInfo.cs
- TransactionsSectionGroup.cs
- DbProviderSpecificTypePropertyAttribute.cs
- SolidColorBrush.cs
- TextModifier.cs
- RightsManagementInformation.cs
- DataGridViewComboBoxEditingControl.cs
- Byte.cs
- DetailsViewInsertedEventArgs.cs
- EncoderNLS.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- StaticFileHandler.cs
- ObjectHelper.cs
- Verify.cs
- DataObjectAttribute.cs
- _SingleItemRequestCache.cs
- EventLogReader.cs
- _SecureChannel.cs
- StringHelper.cs
- FormClosingEvent.cs
- DataListItemCollection.cs
- SqlProvider.cs
- XmlCustomFormatter.cs
- SecurityKeyType.cs
- TextServicesCompartment.cs
- CustomAttributeBuilder.cs
- NullableConverter.cs
- odbcmetadatafactory.cs
- SemaphoreFullException.cs
- DeploymentSectionCache.cs
- DbMetaDataCollectionNames.cs
- IndicShape.cs
- DrawingCollection.cs
- prompt.cs
- SchemaDeclBase.cs
- Rotation3DKeyFrameCollection.cs
- StringResourceManager.cs
- LinkButton.cs
- UnmanagedMemoryStreamWrapper.cs
- PreservationFileReader.cs
- Scheduler.cs
- ProgressiveCrcCalculatingStream.cs
- DataGridViewCellStateChangedEventArgs.cs
- SqlCacheDependencySection.cs
- DuplicateMessageDetector.cs
- HyperLinkColumn.cs
- QueuePathDialog.cs
- PngBitmapDecoder.cs
- ConditionBrowserDialog.cs
- CodeStatementCollection.cs
- cookieexception.cs