Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / Configuration / WebPartsSection.cs / 2 / WebPartsSection.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 WebPartsSection : ConfigurationSection { private static ConfigurationPropertyCollection _properties; private static readonly ConfigurationProperty _propEnableExport = new ConfigurationProperty("enableExport", typeof(bool), false, ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propPersonalization = new ConfigurationProperty("personalization", typeof(WebPartsPersonalization), null, ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propTransformers = new ConfigurationProperty("transformers", typeof(TransformerInfoCollection), null, ConfigurationPropertyOptions.IsDefaultCollection); static WebPartsSection() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propEnableExport); _properties.Add(_propPersonalization); _properties.Add(_propTransformers); } public WebPartsSection() { } /* protected override void InitializeDefault() { /* Don't Add to Basicmap AuthorizationRule rule0 = new AuthorizationRule(AuthorizationRuleAction.Deny); rule0.Users.Add("*"); rule0.Verbs.Add("enterSharedScope"); Personalization.Authorization.Rules.Add(rule0); AuthorizationRule rule1 = new AuthorizationRule(AuthorizationRuleAction.Allow); rule1.Users.Add("*"); rule1.Verbs.Add("modifyState"); Personalization.Authorization.Rules.Add(rule1); */ /* } */ [ConfigurationProperty("enableExport", DefaultValue = false)] public bool EnableExport { get { return (bool)base[_propEnableExport]; } set { base[_propEnableExport] = value; } } [ConfigurationProperty("personalization")] public WebPartsPersonalization Personalization { get { return (WebPartsPersonalization)base[_propPersonalization]; } } /// protected override ConfigurationPropertyCollection Properties { get { return _properties; } } [ConfigurationProperty("transformers")] public TransformerInfoCollection Transformers { get { return (TransformerInfoCollection)base[_propTransformers]; } } protected override object GetRuntimeObject() { Personalization.ValidateAuthorization(); return base.GetRuntimeObject(); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- GorillaCodec.cs
- PageBreakRecord.cs
- XmlChildEnumerator.cs
- WindowsStreamSecurityUpgradeProvider.cs
- XamlTreeBuilder.cs
- TranslateTransform.cs
- DispatcherExceptionEventArgs.cs
- DataGridViewColumnHeaderCell.cs
- StrokeFIndices.cs
- DocumentPageView.cs
- ValueQuery.cs
- JsonServiceDocumentSerializer.cs
- LicenseContext.cs
- StoreAnnotationsMap.cs
- ClientSideProviderDescription.cs
- EncryptedReference.cs
- DataSvcMapFileSerializer.cs
- FindCriteria11.cs
- IsolatedStorageFile.cs
- ResXFileRef.cs
- AttachedPropertyDescriptor.cs
- PersonalizationProviderCollection.cs
- Slider.cs
- AccessedThroughPropertyAttribute.cs
- MenuItem.cs
- MembershipValidatePasswordEventArgs.cs
- ProcessProtocolHandler.cs
- BulletDecorator.cs
- CompositeTypefaceMetrics.cs
- DictionaryBase.cs
- Helper.cs
- EnumerableRowCollection.cs
- SwitchElementsCollection.cs
- JournalNavigationScope.cs
- MailAddressCollection.cs
- DataGridAddNewRow.cs
- NumericUpDown.cs
- Debugger.cs
- DispatcherFrame.cs
- UInt32Storage.cs
- ParameterBuilder.cs
- CodeVariableReferenceExpression.cs
- ImageCodecInfoPrivate.cs
- CodeDelegateCreateExpression.cs
- DocumentViewerBaseAutomationPeer.cs
- PermissionListSet.cs
- SystemColorTracker.cs
- Application.cs
- diagnosticsswitches.cs
- SaveRecipientRequest.cs
- GeneralTransformGroup.cs
- TypeUtil.cs
- Assign.cs
- OleDbParameter.cs
- DictionaryTraceRecord.cs
- GradientStop.cs
- UserMapPath.cs
- EntitySetBase.cs
- MouseGestureValueSerializer.cs
- InternalsVisibleToAttribute.cs
- DefinitionBase.cs
- XmlAutoDetectWriter.cs
- BaseValidator.cs
- XmlCountingReader.cs
- XmlILAnnotation.cs
- complextypematerializer.cs
- PageThemeBuildProvider.cs
- SettingsSection.cs
- ByteStorage.cs
- XmlSchemaDatatype.cs
- RijndaelManagedTransform.cs
- SequenceQuery.cs
- DocumentOutline.cs
- PropertyNames.cs
- BackoffTimeoutHelper.cs
- EdmItemError.cs
- BitmapEffectInputConnector.cs
- HtmlInputSubmit.cs
- InvalidOleVariantTypeException.cs
- SecurityPermission.cs
- FileSecurity.cs
- DbModificationClause.cs
- BatchServiceHost.cs
- WebPartVerbsEventArgs.cs
- TextBoxAutomationPeer.cs
- ProxyAttribute.cs
- Timer.cs
- XmlSchemaDocumentation.cs
- ClientRolePrincipal.cs
- CompiledRegexRunner.cs
- TextServicesProperty.cs
- DynamicEndpoint.cs
- RegistryHandle.cs
- Tool.cs
- ServiceControllerDesigner.cs
- ExpressionsCollectionEditor.cs
- Int64Converter.cs
- SmtpTransport.cs
- DeflateEmulationStream.cs
- InkCanvasAutomationPeer.cs