Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / IgnoreDeviceFilterElementCollection.cs / 1305376 / IgnoreDeviceFilterElementCollection.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; [ConfigurationCollection(typeof(IgnoreDeviceFilterElement), AddItemName = "filter", CollectionType = ConfigurationElementCollectionType.BasicMap)] public sealed class IgnoreDeviceFilterElementCollection : ConfigurationElementCollection { private static readonly ConfigurationPropertyCollection _properties; static IgnoreDeviceFilterElementCollection() { _properties = new ConfigurationPropertyCollection(); } public IgnoreDeviceFilterElementCollection() : base(StringComparer.OrdinalIgnoreCase) { } protected override ConfigurationPropertyCollection Properties { get { return _properties; } } public void Add(IgnoreDeviceFilterElement deviceFilter) { BaseAdd(deviceFilter); } public void Remove(string name) { BaseRemove(name); } public void Remove(IgnoreDeviceFilterElement deviceFilter) { BaseRemove(GetElementKey(deviceFilter)); } public void RemoveAt(int index) { BaseRemoveAt(index); } public new IgnoreDeviceFilterElement this[string name] { get { return (IgnoreDeviceFilterElement)BaseGet(name); } } public IgnoreDeviceFilterElement this[int index] { get { return (IgnoreDeviceFilterElement)BaseGet(index); } set { if (BaseGet(index) != null) { BaseRemoveAt(index); } BaseAdd(index, value); } } public void Clear() { BaseClear(); } [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Justification = "Can't modify the base class.")] protected override ConfigurationElement CreateNewElement() { return new IgnoreDeviceFilterElement(); } [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Justification = "Can't modify the base class.")] protected override Object GetElementKey(ConfigurationElement element) { return ((IgnoreDeviceFilterElement)element).Name; } [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Justification = "Can't modify the base class.")] protected override string ElementName { get { return "filter"; } } [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Justification = "Can't modify the base class.")] public override ConfigurationElementCollectionType CollectionType { get { return ConfigurationElementCollectionType.BasicMap; } } } } // 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; [ConfigurationCollection(typeof(IgnoreDeviceFilterElement), AddItemName = "filter", CollectionType = ConfigurationElementCollectionType.BasicMap)] public sealed class IgnoreDeviceFilterElementCollection : ConfigurationElementCollection { private static readonly ConfigurationPropertyCollection _properties; static IgnoreDeviceFilterElementCollection() { _properties = new ConfigurationPropertyCollection(); } public IgnoreDeviceFilterElementCollection() : base(StringComparer.OrdinalIgnoreCase) { } protected override ConfigurationPropertyCollection Properties { get { return _properties; } } public void Add(IgnoreDeviceFilterElement deviceFilter) { BaseAdd(deviceFilter); } public void Remove(string name) { BaseRemove(name); } public void Remove(IgnoreDeviceFilterElement deviceFilter) { BaseRemove(GetElementKey(deviceFilter)); } public void RemoveAt(int index) { BaseRemoveAt(index); } public new IgnoreDeviceFilterElement this[string name] { get { return (IgnoreDeviceFilterElement)BaseGet(name); } } public IgnoreDeviceFilterElement this[int index] { get { return (IgnoreDeviceFilterElement)BaseGet(index); } set { if (BaseGet(index) != null) { BaseRemoveAt(index); } BaseAdd(index, value); } } public void Clear() { BaseClear(); } [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Justification = "Can't modify the base class.")] protected override ConfigurationElement CreateNewElement() { return new IgnoreDeviceFilterElement(); } [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Justification = "Can't modify the base class.")] protected override Object GetElementKey(ConfigurationElement element) { return ((IgnoreDeviceFilterElement)element).Name; } [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Justification = "Can't modify the base class.")] protected override string ElementName { get { return "filter"; } } [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Justification = "Can't modify the base class.")] public override ConfigurationElementCollectionType CollectionType { get { return ConfigurationElementCollectionType.BasicMap; } } } } // 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
- figurelength.cs
- DropSource.cs
- basecomparevalidator.cs
- DynamicField.cs
- SequenceDesigner.cs
- BitmapPalettes.cs
- DetailsViewDeletedEventArgs.cs
- ServiceDescriptionImporter.cs
- ToolStripPanel.cs
- ConnectionPoolManager.cs
- SerializerProvider.cs
- ResXResourceSet.cs
- InternalUserCancelledException.cs
- SymLanguageVendor.cs
- LocalBuilder.cs
- DateTime.cs
- DefaultPrintController.cs
- ParenthesizePropertyNameAttribute.cs
- ObsoleteAttribute.cs
- ListenerServiceInstallComponent.cs
- CaseInsensitiveComparer.cs
- SpanIndex.cs
- X509RawDataKeyIdentifierClause.cs
- RemotingException.cs
- EntityDataSourceView.cs
- DataGridViewComboBoxCell.cs
- SinglePageViewer.cs
- SqlDependencyUtils.cs
- XmlReader.cs
- HuffCodec.cs
- AdornerDecorator.cs
- ConstraintEnumerator.cs
- EventLogEntryCollection.cs
- ValidationError.cs
- HttpEncoder.cs
- PackWebRequest.cs
- WorkflowApplicationUnloadedException.cs
- OneOf.cs
- MemberAccessException.cs
- ElementUtil.cs
- DataBindingList.cs
- ValuePatternIdentifiers.cs
- DescendantQuery.cs
- Message.cs
- TemplateControlParser.cs
- BuildResult.cs
- WindowsSlider.cs
- PointLight.cs
- PublisherIdentityPermission.cs
- XsdDateTime.cs
- ControlUtil.cs
- SByteConverter.cs
- LoginUtil.cs
- ErrorActivity.cs
- PartialCachingAttribute.cs
- ApplicationSecurityInfo.cs
- messageonlyhwndwrapper.cs
- Line.cs
- CodeTypeConstructor.cs
- SchemaManager.cs
- TransformerInfo.cs
- CfgParser.cs
- Exceptions.cs
- ConnectionPointGlyph.cs
- ExtendedProperty.cs
- Rectangle.cs
- Expression.cs
- MethodCallConverter.cs
- CodeVariableReferenceExpression.cs
- ProxyWebPartConnectionCollection.cs
- RectangleGeometry.cs
- SafeSecurityHandles.cs
- UseManagedPresentationBindingElementImporter.cs
- AvTraceFormat.cs
- BufferModesCollection.cs
- BitmapEffectDrawingContextState.cs
- ParagraphResult.cs
- HtmlEmptyTagControlBuilder.cs
- StatusBar.cs
- EntitySetBaseCollection.cs
- PieceDirectory.cs
- ReflectEventDescriptor.cs
- Panel.cs
- BindingMAnagerBase.cs
- ComponentResourceManager.cs
- GroupBoxRenderer.cs
- AmbientProperties.cs
- AutomationPattern.cs
- ComboBoxAutomationPeer.cs
- SecurityRuntime.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- StylusPointPropertyUnit.cs
- TcpClientSocketManager.cs
- Filter.cs
- MediaPlayer.cs
- CultureMapper.cs
- ExtensionSimplifierMarkupObject.cs
- SpeechSynthesizer.cs
- InternalConfigSettingsFactory.cs
- WhitespaceSignificantCollectionAttribute.cs