Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FormViewModeEventArgs.cs
- SecurityAlgorithmSuiteConverter.cs
- BigInt.cs
- SqlTypesSchemaImporter.cs
- DesignerTransactionCloseEvent.cs
- CounterCreationDataCollection.cs
- ReadOnlyDictionary.cs
- StaticSiteMapProvider.cs
- RotationValidation.cs
- FactoryRecord.cs
- ConstructorExpr.cs
- FixedSOMPageConstructor.cs
- DiscoveryClientElement.cs
- BamlRecords.cs
- GetIsBrowserClientRequest.cs
- TypeResolvingOptions.cs
- CheckedPointers.cs
- MatrixConverter.cs
- SqlBuilder.cs
- QuotaExceededException.cs
- XmlSchemaSimpleTypeUnion.cs
- DrawingCollection.cs
- Image.cs
- BaseParser.cs
- DocumentPage.cs
- QilBinary.cs
- XdrBuilder.cs
- PageTheme.cs
- SecurityTokenException.cs
- TabItemAutomationPeer.cs
- ItemCollectionEditor.cs
- IteratorDescriptor.cs
- HashCodeCombiner.cs
- FontUnit.cs
- ListBoxItemAutomationPeer.cs
- EventLogHandle.cs
- ContentOperations.cs
- FormsAuthenticationCredentials.cs
- Wildcard.cs
- DbgUtil.cs
- RangeValidator.cs
- RegexGroup.cs
- OutOfProcStateClientManager.cs
- LogicalExpr.cs
- StrongNameKeyPair.cs
- FontStyles.cs
- ValueUnavailableException.cs
- SqlDataReader.cs
- CompilationUtil.cs
- OletxResourceManager.cs
- SqlVisitor.cs
- SortQuery.cs
- _CacheStreams.cs
- KeyTimeConverter.cs
- EdgeModeValidation.cs
- StrongNameIdentityPermission.cs
- BinaryParser.cs
- PersistenceTypeAttribute.cs
- SymLanguageType.cs
- EntityTypeBase.cs
- XPathDocument.cs
- SafeSecurityHandles.cs
- ZipIOExtraField.cs
- HttpModuleCollection.cs
- COM2AboutBoxPropertyDescriptor.cs
- BindingWorker.cs
- RNGCryptoServiceProvider.cs
- X500Name.cs
- ListDictionary.cs
- XamlPointCollectionSerializer.cs
- ProviderConnectionPointCollection.cs
- RadioButton.cs
- MdiWindowListItemConverter.cs
- TrackingMemoryStream.cs
- ListItemCollection.cs
- SemanticBasicElement.cs
- ZipIOBlockManager.cs
- BindingParameterCollection.cs
- Pick.cs
- StreamGeometry.cs
- CannotUnloadAppDomainException.cs
- XMLSchema.cs
- LogReservationCollection.cs
- FixUpCollection.cs
- AlternationConverter.cs
- Column.cs
- ServiceElement.cs
- BindingExpressionBase.cs
- InvalidComObjectException.cs
- DeclaredTypeValidator.cs
- PropertyGeneratedEventArgs.cs
- MD5.cs
- SafeTimerHandle.cs
- TypeInitializationException.cs
- XmlElementAttributes.cs
- Scene3D.cs
- SettingsPropertyWrongTypeException.cs
- EntityConnection.cs
- WeakRefEnumerator.cs
- InvalidCastException.cs