Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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); } } } } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlValidatingReader.cs
- ObjectViewEntityCollectionData.cs
- SQLStringStorage.cs
- PeerMessageDispatcher.cs
- OdbcConnectionOpen.cs
- ShapeTypeface.cs
- X509SecurityTokenProvider.cs
- ProcessInfo.cs
- BaseProcessor.cs
- LayoutTable.cs
- ShimAsPublicXamlType.cs
- DataGridRow.cs
- ResourcesBuildProvider.cs
- BufferedWebEventProvider.cs
- RenderingEventArgs.cs
- LinkButton.cs
- ComponentEditorPage.cs
- IgnoreFlushAndCloseStream.cs
- SystemTcpStatistics.cs
- LinkUtilities.cs
- XmlSchemaExporter.cs
- KnownTypeAttribute.cs
- TranslateTransform.cs
- Hashtable.cs
- FontWeight.cs
- Restrictions.cs
- AmbiguousMatchException.cs
- LicenseManager.cs
- XmlStreamStore.cs
- Bezier.cs
- SspiHelper.cs
- WebDescriptionAttribute.cs
- EventDescriptor.cs
- RightsManagementPermission.cs
- VScrollBar.cs
- SchemaInfo.cs
- XmlSchemaComplexContentRestriction.cs
- LicFileLicenseProvider.cs
- PersonalizationAdministration.cs
- StatusStrip.cs
- DataException.cs
- ContainerSelectorActiveEvent.cs
- PropertySourceInfo.cs
- StyleBamlTreeBuilder.cs
- Enlistment.cs
- MetadataPropertyvalue.cs
- QuaternionValueSerializer.cs
- SqlParameterCollection.cs
- SystemIPv6InterfaceProperties.cs
- ContextMenuService.cs
- Package.cs
- Pipe.cs
- ControlBuilder.cs
- ClientRolePrincipal.cs
- Timer.cs
- StrongTypingException.cs
- ObjectStateManagerMetadata.cs
- FrameworkElement.cs
- ManifestResourceInfo.cs
- QuadraticBezierSegment.cs
- PathGeometry.cs
- ButtonChrome.cs
- ImageCodecInfo.cs
- ProtectedProviderSettings.cs
- QueryHandler.cs
- RC2.cs
- InvalidProgramException.cs
- ContextMarshalException.cs
- ByteStreamGeometryContext.cs
- DataStreamFromComStream.cs
- MediaPlayer.cs
- X509ClientCertificateCredentialsElement.cs
- DesignerActionPanel.cs
- ClientType.cs
- StylusSystemGestureEventArgs.cs
- ServiceMetadataContractBehavior.cs
- ErrorFormatter.cs
- MarkupExtensionParser.cs
- OdbcConnectionHandle.cs
- GeneralTransformGroup.cs
- AttributeUsageAttribute.cs
- SqlVersion.cs
- DesignerToolboxInfo.cs
- DataGridViewSortCompareEventArgs.cs
- TextTreeTextNode.cs
- OracleCommand.cs
- _AutoWebProxyScriptWrapper.cs
- NativeRecognizer.cs
- UserNameSecurityToken.cs
- RSAPKCS1SignatureFormatter.cs
- BaseCodeDomTreeGenerator.cs
- AccessDataSourceDesigner.cs
- DataShape.cs
- CqlErrorHelper.cs
- AsymmetricSignatureDeformatter.cs
- AcceptorSessionSymmetricTransportSecurityProtocol.cs
- ArgumentException.cs
- CalendarButton.cs
- FontDifferentiator.cs
- ColorConvertedBitmap.cs