Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / WebPartsSection.cs / 1305376 / 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; /**/ 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(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // // 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; /**/ 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(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TableLayoutColumnStyleCollection.cs
- LayoutTableCell.cs
- EmbeddedMailObjectCollectionEditor.cs
- InstalledFontCollection.cs
- OutputCacheSettingsSection.cs
- FileDetails.cs
- DataGridAutoFormatDialog.cs
- DurableMessageDispatchInspector.cs
- ToolboxComponentsCreatingEventArgs.cs
- GZipDecoder.cs
- ChangeConflicts.cs
- HtmlWindowCollection.cs
- TextMetrics.cs
- TrailingSpaceComparer.cs
- ValidatorCollection.cs
- TableStyle.cs
- MobileControlPersister.cs
- DataRow.cs
- XsdSchemaFileEditor.cs
- ActivityMarkupSerializationProvider.cs
- ApplicationDirectoryMembershipCondition.cs
- TreeNodeMouseHoverEvent.cs
- ColumnMapTranslator.cs
- PermissionSetEnumerator.cs
- MenuCommand.cs
- DesignerRegionMouseEventArgs.cs
- GridViewActionList.cs
- AmbientEnvironment.cs
- Types.cs
- CacheVirtualItemsEvent.cs
- FixedSOMTableCell.cs
- AnonymousIdentificationModule.cs
- XmlReader.cs
- EntityDataSourceChangedEventArgs.cs
- SmiEventSink_DeferedProcessing.cs
- UpdatePanelTrigger.cs
- Soap.cs
- SupportsPreviewControlAttribute.cs
- InputChannelAcceptor.cs
- SortableBindingList.cs
- EventLog.cs
- ProxyManager.cs
- SchemaMapping.cs
- AsymmetricKeyExchangeDeformatter.cs
- ScriptingJsonSerializationSection.cs
- ObjectToken.cs
- StrokeCollection.cs
- ColorTransformHelper.cs
- QuaternionAnimationBase.cs
- WebPartUserCapability.cs
- DataPagerCommandEventArgs.cs
- MsmqChannelListenerBase.cs
- X509CertificateStore.cs
- MinMaxParagraphWidth.cs
- UInt32.cs
- EntityKey.cs
- StringInfo.cs
- SafePointer.cs
- ZoneButton.cs
- SimpleWorkerRequest.cs
- XpsFilter.cs
- DataGridCellItemAutomationPeer.cs
- PnrpPermission.cs
- HttpApplicationStateWrapper.cs
- TimeSpan.cs
- _TLSstream.cs
- TextAction.cs
- DocumentScope.cs
- TextPointerBase.cs
- diagnosticsswitches.cs
- HMACSHA384.cs
- ViewSimplifier.cs
- base64Transforms.cs
- hwndwrapper.cs
- JulianCalendar.cs
- LocalizableResourceBuilder.cs
- FunctionImportMapping.ReturnTypeRenameMapping.cs
- UnauthorizedAccessException.cs
- HtmlTableRow.cs
- SystemColors.cs
- ListBindingHelper.cs
- BuildProviderAppliesToAttribute.cs
- ADConnectionHelper.cs
- RtType.cs
- ImageListUtils.cs
- MediaContext.cs
- DoWorkEventArgs.cs
- DisableDpiAwarenessAttribute.cs
- ControlPropertyNameConverter.cs
- ConnectionStringsSection.cs
- NavigationCommands.cs
- TemplateKeyConverter.cs
- TrayIconDesigner.cs
- BindingWorker.cs
- Empty.cs
- NativeMethods.cs
- VerificationException.cs
- HMACRIPEMD160.cs
- DataControlReference.cs
- WindowsSecurityToken.cs