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
- EdmToObjectNamespaceMap.cs
- ChangeProcessor.cs
- ParsedAttributeCollection.cs
- ProvidersHelper.cs
- DelegatedStream.cs
- ArgumentsParser.cs
- OutOfProcStateClientManager.cs
- BooleanAnimationBase.cs
- ZipIOLocalFileHeader.cs
- PropertyGrid.cs
- DataGridCommandEventArgs.cs
- BasicExpressionVisitor.cs
- DbMetaDataFactory.cs
- SpecularMaterial.cs
- RoleBoolean.cs
- ItemPager.cs
- DataFieldConverter.cs
- OleAutBinder.cs
- HtmlLiteralTextAdapter.cs
- ParagraphResult.cs
- StandardTransformFactory.cs
- Stream.cs
- PolicyConversionContext.cs
- TraversalRequest.cs
- XmlSchemaAppInfo.cs
- DiagnosticsConfiguration.cs
- Form.cs
- SortedSetDebugView.cs
- BindingMemberInfo.cs
- NativeMethods.cs
- ManagementEventArgs.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- WorkflowServiceAttributes.cs
- CustomActivityDesigner.cs
- CroppedBitmap.cs
- AdPostCacheSubstitution.cs
- ContainerVisual.cs
- UrlMappingsModule.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- BitmapFrameEncode.cs
- XmlSchemaSimpleType.cs
- XamlSerializerUtil.cs
- StrokeRenderer.cs
- basemetadatamappingvisitor.cs
- SrgsElementFactoryCompiler.cs
- SmiSettersStream.cs
- CustomCategoryAttribute.cs
- MultiView.cs
- DataGridViewRow.cs
- EmptyStringExpandableObjectConverter.cs
- DataTemplateSelector.cs
- BamlWriter.cs
- InputProcessorProfiles.cs
- AssemblyInfo.cs
- XmlCDATASection.cs
- PerspectiveCamera.cs
- CngKey.cs
- ConnectionStringsExpressionBuilder.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- JavaScriptSerializer.cs
- X509ChainPolicy.cs
- PersistenceTypeAttribute.cs
- TraceContextRecord.cs
- PngBitmapEncoder.cs
- ProfileEventArgs.cs
- CompModHelpers.cs
- ContentType.cs
- ToolStripButton.cs
- ResourceDescriptionAttribute.cs
- IOThreadScheduler.cs
- MenuCommand.cs
- CompilerParameters.cs
- Configuration.cs
- TriggerAction.cs
- Parallel.cs
- ProjectionPathSegment.cs
- VBIdentifierNameEditor.cs
- DataKeyCollection.cs
- ActionMessageFilterTable.cs
- XamlToRtfParser.cs
- DataSourceXmlTextReader.cs
- RoleServiceManager.cs
- QuadraticBezierSegment.cs
- TakeQueryOptionExpression.cs
- DataBoundControlParameterTarget.cs
- HtmlTextArea.cs
- XPathParser.cs
- MatrixValueSerializer.cs
- Evaluator.cs
- CatalogPart.cs
- BevelBitmapEffect.cs
- Control.cs
- Socket.cs
- StateChangeEvent.cs
- PresentationAppDomainManager.cs
- SiteMembershipCondition.cs
- DataGridItemEventArgs.cs
- EventInfo.cs
- ValuePatternIdentifiers.cs
- OleDbReferenceCollection.cs