Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / IgnoreDeviceFilterElement.cs / 1305376 / IgnoreDeviceFilterElement.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Configuration { using System; using System.Configuration; using System.Collections.Specialized; using System.Collections; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Security.Permissions; using System.Text; using System.Threading; using System.Web.Util; using System.Web.UI; using System.Web.Compilation; using System.Web.Configuration; using System.Xml; public sealed class IgnoreDeviceFilterElement : ConfigurationElement { private static readonly ConfigurationElementProperty s_elemProperty = new ConfigurationElementProperty(new CallbackValidator(typeof(IgnoreDeviceFilterElement), ValidateElement)); private static ConfigurationPropertyCollection _properties; #region Property Declarations private static readonly ConfigurationProperty _propName = new ConfigurationProperty("name", typeof(string), null, null, StdValidatorsAndConverters.NonEmptyStringValidator, ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey); #endregion static IgnoreDeviceFilterElement() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propName); } internal IgnoreDeviceFilterElement() { } public IgnoreDeviceFilterElement(string name) { base[_propName] = name; } [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Justification = "Can't modify the base class.")] protected override ConfigurationPropertyCollection Properties { get { return _properties; } } [ConfigurationProperty("name", IsRequired = true, IsKey = true)] [StringValidator(MinLength = 1)] public string Name { get { return (string)base[_propName]; } } [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Justification = "Can't modify the base class.")] protected override ConfigurationElementProperty ElementProperty { get { return s_elemProperty; } } static private void ValidateElement(object value) { Debug.Assert((value != null) && (value is IgnoreDeviceFilterElement)); IgnoreDeviceFilterElement elem = (IgnoreDeviceFilterElement)value; if (System.Web.UI.Util.ContainsWhiteSpace(elem.Name)) { throw new ConfigurationErrorsException( SR.GetString(SR.Space_attribute, "name")); } } } } // 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.Specialized; using System.Collections; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Security.Permissions; using System.Text; using System.Threading; using System.Web.Util; using System.Web.UI; using System.Web.Compilation; using System.Web.Configuration; using System.Xml; public sealed class IgnoreDeviceFilterElement : ConfigurationElement { private static readonly ConfigurationElementProperty s_elemProperty = new ConfigurationElementProperty(new CallbackValidator(typeof(IgnoreDeviceFilterElement), ValidateElement)); private static ConfigurationPropertyCollection _properties; #region Property Declarations private static readonly ConfigurationProperty _propName = new ConfigurationProperty("name", typeof(string), null, null, StdValidatorsAndConverters.NonEmptyStringValidator, ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey); #endregion static IgnoreDeviceFilterElement() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propName); } internal IgnoreDeviceFilterElement() { } public IgnoreDeviceFilterElement(string name) { base[_propName] = name; } [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Justification = "Can't modify the base class.")] protected override ConfigurationPropertyCollection Properties { get { return _properties; } } [ConfigurationProperty("name", IsRequired = true, IsKey = true)] [StringValidator(MinLength = 1)] public string Name { get { return (string)base[_propName]; } } [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Justification = "Can't modify the base class.")] protected override ConfigurationElementProperty ElementProperty { get { return s_elemProperty; } } static private void ValidateElement(object value) { Debug.Assert((value != null) && (value is IgnoreDeviceFilterElement)); IgnoreDeviceFilterElement elem = (IgnoreDeviceFilterElement)value; if (System.Web.UI.Util.ContainsWhiteSpace(elem.Name)) { throw new ConfigurationErrorsException( SR.GetString(SR.Space_attribute, "name")); } } } } // 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
- SafeSecurityHandles.cs
- CapabilitiesRule.cs
- TransformGroup.cs
- ManifestResourceInfo.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- ToolStripManager.cs
- InkPresenter.cs
- SystemWebExtensionsSectionGroup.cs
- DocumentGridContextMenu.cs
- TraceContextRecord.cs
- OleDbSchemaGuid.cs
- XmlNodeWriter.cs
- Highlights.cs
- PriorityQueue.cs
- ImmutableObjectAttribute.cs
- MenuItemStyle.cs
- IntSecurity.cs
- ReferenceAssemblyAttribute.cs
- _SSPISessionCache.cs
- ApplicationHost.cs
- HttpProfileGroupBase.cs
- CreatingCookieEventArgs.cs
- DataGridViewTextBoxEditingControl.cs
- CompositeCollectionView.cs
- HwndKeyboardInputProvider.cs
- ZoneLinkButton.cs
- SafeRightsManagementEnvironmentHandle.cs
- PrivateFontCollection.cs
- DataRecordInternal.cs
- DescendentsWalker.cs
- SqlAggregateChecker.cs
- NativeMethods.cs
- KeySpline.cs
- TextContainerHelper.cs
- GenericEnumConverter.cs
- BuildProviderAppliesToAttribute.cs
- UriWriter.cs
- StatusBar.cs
- MsmqIntegrationOutputChannel.cs
- DataGridColumnHeader.cs
- PageThemeBuildProvider.cs
- UDPClient.cs
- WCFBuildProvider.cs
- TimerTable.cs
- RequestStatusBarUpdateEventArgs.cs
- DbException.cs
- ModelUIElement3D.cs
- BaseParaClient.cs
- QilPatternVisitor.cs
- SessionStateContainer.cs
- UserControlCodeDomTreeGenerator.cs
- HyperLinkDataBindingHandler.cs
- VectorCollectionConverter.cs
- Misc.cs
- CacheVirtualItemsEvent.cs
- MenuItem.cs
- RowToFieldTransformer.cs
- TextEmbeddedObject.cs
- TracedNativeMethods.cs
- XmlDictionaryString.cs
- AsmxEndpointPickerExtension.cs
- ApplicationDirectoryMembershipCondition.cs
- DoubleLink.cs
- DbUpdateCommandTree.cs
- RIPEMD160Managed.cs
- PatternMatcher.cs
- TextRunCache.cs
- EventSource.cs
- OdbcPermission.cs
- SqlPersonalizationProvider.cs
- DependencyPropertyKey.cs
- BoundColumn.cs
- TwoPhaseCommitProxy.cs
- log.cs
- Regex.cs
- CommandExpr.cs
- StringUtil.cs
- EntityProxyTypeInfo.cs
- SubqueryRules.cs
- SemaphoreSlim.cs
- DataTableExtensions.cs
- ConfigurationSettings.cs
- CriticalExceptions.cs
- OutOfProcStateClientManager.cs
- SafeBitVector32.cs
- DynamicControl.cs
- NetworkCredential.cs
- XmlName.cs
- Crypto.cs
- RawStylusInput.cs
- GlyphElement.cs
- QueryStringParameter.cs
- HierarchicalDataSourceControl.cs
- XPathScanner.cs
- PagesSection.cs
- SslStream.cs
- MenuItem.cs
- SafeLibraryHandle.cs
- ISAPIApplicationHost.cs
- RequestCachingSection.cs