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
- ListViewCancelEventArgs.cs
- CachingHintValidation.cs
- HandlerBase.cs
- DynamicField.cs
- BooleanFunctions.cs
- ServiceHttpModule.cs
- EditableTreeList.cs
- PhonemeEventArgs.cs
- TreeViewEvent.cs
- SecurityResources.cs
- bidPrivateBase.cs
- validationstate.cs
- QilInvoke.cs
- CodeGenerator.cs
- ValidatorCompatibilityHelper.cs
- FamilyTypefaceCollection.cs
- FormViewPagerRow.cs
- Item.cs
- xdrvalidator.cs
- WebBrowserProgressChangedEventHandler.cs
- HtmlLink.cs
- EmptyImpersonationContext.cs
- WsdlInspector.cs
- StateManagedCollection.cs
- WebPartVerbsEventArgs.cs
- RouteValueExpressionBuilder.cs
- SpnegoTokenProvider.cs
- EntityTypeBase.cs
- PseudoWebRequest.cs
- Propagator.cs
- LayoutTableCell.cs
- WpfKnownMemberInvoker.cs
- WebBrowserContainer.cs
- EncodingStreamWrapper.cs
- OleDbRowUpdatedEvent.cs
- DataTrigger.cs
- RegisteredArrayDeclaration.cs
- ConfigurationSchemaErrors.cs
- Models.cs
- EntityDataSourceDesignerHelper.cs
- NameValuePair.cs
- WorkflowRuntimeServiceElementCollection.cs
- MouseEventArgs.cs
- PiiTraceSource.cs
- NativeMethods.cs
- MetadataSerializer.cs
- SQLMembershipProvider.cs
- LabelAutomationPeer.cs
- LZCodec.cs
- WebReferencesBuildProvider.cs
- AppSecurityManager.cs
- InitializationEventAttribute.cs
- HtmlInputCheckBox.cs
- RoleBoolean.cs
- TextInfo.cs
- VirtualDirectoryMapping.cs
- TypeBuilder.cs
- SystemIPv4InterfaceProperties.cs
- Convert.cs
- FormsIdentity.cs
- wgx_sdk_version.cs
- ADRoleFactoryConfiguration.cs
- IntellisenseTextBox.cs
- XamlSerializerUtil.cs
- FileChangesMonitor.cs
- SecurityDocument.cs
- ServerValidateEventArgs.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- Transform3D.cs
- Automation.cs
- DateTimeOffset.cs
- BinaryReader.cs
- PasswordTextNavigator.cs
- SRGSCompiler.cs
- SafeCertificateContext.cs
- ChangesetResponse.cs
- HostVisual.cs
- FtpRequestCacheValidator.cs
- ListDictionaryInternal.cs
- TypefaceMap.cs
- Emitter.cs
- PathFigure.cs
- ControlPersister.cs
- TraceProvider.cs
- _DomainName.cs
- ExpressionTextBox.xaml.cs
- IIS7UserPrincipal.cs
- basenumberconverter.cs
- LiteralLink.cs
- Binding.cs
- DrawTreeNodeEventArgs.cs
- DoubleUtil.cs
- MultiBindingExpression.cs
- SimpleMailWebEventProvider.cs
- Drawing.cs
- TypePresenter.xaml.cs
- InfoCardAsymmetricCrypto.cs
- RijndaelManaged.cs
- SqlFacetAttribute.cs
- TextChange.cs