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
- GPPOINTF.cs
- ScriptComponentDescriptor.cs
- DataGridViewCellMouseEventArgs.cs
- TagMapCollection.cs
- HtmlProps.cs
- ConfigXmlComment.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- BitmapEffectDrawing.cs
- QueryRewriter.cs
- SizeIndependentAnimationStorage.cs
- XhtmlTextWriter.cs
- ListChunk.cs
- InstallerTypeAttribute.cs
- WebBrowserUriTypeConverter.cs
- HtmlLink.cs
- XmlSerializationWriter.cs
- AssemblyCollection.cs
- UrlMappingsModule.cs
- ProcessInputEventArgs.cs
- FloaterParaClient.cs
- SqlException.cs
- OdbcParameterCollection.cs
- CacheDependency.cs
- RedistVersionInfo.cs
- WindowsIdentity.cs
- SkipQueryOptionExpression.cs
- ConfigXmlCDataSection.cs
- Trustee.cs
- IndentedWriter.cs
- EventLogEntryCollection.cs
- _NTAuthentication.cs
- SQLGuidStorage.cs
- UnsafeNativeMethods.cs
- TransportChannelFactory.cs
- Vector3DAnimation.cs
- DataSysAttribute.cs
- TcpStreams.cs
- InternalException.cs
- TypeConverterHelper.cs
- ListViewItemEventArgs.cs
- PassportAuthenticationEventArgs.cs
- CompatibleIComparer.cs
- IdnMapping.cs
- DynamicRouteExpression.cs
- SettingsProviderCollection.cs
- TextTreeDeleteContentUndoUnit.cs
- ConfigurationPropertyAttribute.cs
- MetadataUtil.cs
- COAUTHINFO.cs
- SourceFileInfo.cs
- Convert.cs
- PointLightBase.cs
- SettingsPropertyIsReadOnlyException.cs
- followingquery.cs
- Compiler.cs
- HttpCacheParams.cs
- GradientStop.cs
- GlyphRunDrawing.cs
- LogRecordSequence.cs
- MergeLocalizationDirectives.cs
- PipeException.cs
- XmlSchemaIdentityConstraint.cs
- ClassImporter.cs
- SqlLiftIndependentRowExpressions.cs
- BaseTransportHeaders.cs
- XmlSchemaInfo.cs
- CompilationSection.cs
- List.cs
- ColorTransformHelper.cs
- EpmCustomContentSerializer.cs
- XmlNamespaceDeclarationsAttribute.cs
- BufferedGraphicsManager.cs
- MultiPartWriter.cs
- ListViewInsertedEventArgs.cs
- SQLGuidStorage.cs
- Serializer.cs
- HttpListenerRequestTraceRecord.cs
- Nullable.cs
- XPathSelectionIterator.cs
- WebPartChrome.cs
- GcSettings.cs
- _CommandStream.cs
- LineProperties.cs
- NativeMethods.cs
- BufferBuilder.cs
- ContentDisposition.cs
- RegexCompilationInfo.cs
- DesignSurface.cs
- DesignerActionMethodItem.cs
- DependencyProperty.cs
- CompositeActivityCodeGenerator.cs
- DataPagerFieldItem.cs
- MenuBase.cs
- MatchAttribute.cs
- ToolStripHighContrastRenderer.cs
- QueryPageSettingsEventArgs.cs
- JsonFaultDetail.cs
- ControlCodeDomSerializer.cs
- SerializationStore.cs
- PartialCachingAttribute.cs