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
- WebPartUtil.cs
- ResourcePermissionBase.cs
- MessageQueuePermissionEntry.cs
- LinkDesigner.cs
- Model3D.cs
- wgx_sdk_version.cs
- ConfigXmlCDataSection.cs
- CellIdBoolean.cs
- DecoratedNameAttribute.cs
- PageContentAsyncResult.cs
- SpecialNameAttribute.cs
- TimeoutException.cs
- Section.cs
- ComAdminWrapper.cs
- HwndSourceKeyboardInputSite.cs
- Compiler.cs
- ConfigurationManager.cs
- SetStoryboardSpeedRatio.cs
- Listbox.cs
- HopperCache.cs
- Matrix3D.cs
- MemoryResponseElement.cs
- ListViewTableRow.cs
- TextComposition.cs
- TemplateControl.cs
- FileCodeGroup.cs
- ThreadPool.cs
- EndCreateSecurityTokenRequest.cs
- ManagedIStream.cs
- SelectionPatternIdentifiers.cs
- SimpleWebHandlerParser.cs
- EventLogReader.cs
- ToolStripRenderer.cs
- MetricEntry.cs
- CommandManager.cs
- CaseStatementSlot.cs
- GenerateHelper.cs
- BaseTemplateCodeDomTreeGenerator.cs
- WhitespaceRuleReader.cs
- _HTTPDateParse.cs
- CompilerTypeWithParams.cs
- ThreadAbortException.cs
- DataSourceControlBuilder.cs
- ObjectViewQueryResultData.cs
- Paragraph.cs
- AliasExpr.cs
- UDPClient.cs
- SqlClientWrapperSmiStream.cs
- NetworkCredential.cs
- QilScopedVisitor.cs
- Binding.cs
- PrtCap_Reader.cs
- ToolBar.cs
- PropertyPathConverter.cs
- DbDataRecord.cs
- XmlILAnnotation.cs
- OptimalBreakSession.cs
- BuildDependencySet.cs
- _SingleItemRequestCache.cs
- MimeTextImporter.cs
- XmlSchemaRedefine.cs
- DefaultProxySection.cs
- RestHandlerFactory.cs
- DataMemberConverter.cs
- KerberosTicketHashIdentifierClause.cs
- PropertyChangeTracker.cs
- HtmlHistory.cs
- DrawingAttributes.cs
- PageBuildProvider.cs
- Deflater.cs
- UriTemplateMatchException.cs
- AlphabetConverter.cs
- RuntimeWrappedException.cs
- HttpCookiesSection.cs
- SQLUtility.cs
- Size3D.cs
- WindowsPrincipal.cs
- IdnElement.cs
- InitializerFacet.cs
- Page.cs
- LazyTextWriterCreator.cs
- SystemSounds.cs
- SQLDateTime.cs
- NativeMethods.cs
- WebBrowserDocumentCompletedEventHandler.cs
- HwndSourceKeyboardInputSite.cs
- WebException.cs
- UserPersonalizationStateInfo.cs
- IDispatchConstantAttribute.cs
- SmtpFailedRecipientException.cs
- ModulesEntry.cs
- DataSourceSerializationException.cs
- ConsoleTraceListener.cs
- HtmlTable.cs
- IPAddress.cs
- BrowserCapabilitiesFactory.cs
- FrameworkRichTextComposition.cs
- ResourcePool.cs
- Object.cs
- RandomDelaySendsAsyncResult.cs