Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / ValidatorCollection.cs / 1 / ValidatorCollection.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace System.Web.UI {
using System.Runtime.InteropServices;
using System.Collections;
using System.Security.Permissions;
///
/// Exposes a
/// read-only array of
/// references.
///
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public sealed class ValidatorCollection : ICollection {
private ArrayList data;
///
/// Initializes a new instance of the class.
///
public ValidatorCollection() {
data = new ArrayList();
}
///
/// Indicates the number of references in the collection.
/// This property is read-only.
///
public int Count {
get {
return data.Count;
}
}
///
/// Indicates the validator at the specified index. This
/// property is read-only.
///
public IValidator this[int index] {
get {
return(IValidator) data[index];
}
}
///
/// Adds the specified validator to the collection.
///
public void Add(IValidator validator) {
data.Add(validator);
}
///
/// Returns whether the specified validator exists in the collection.
///
public bool Contains(IValidator validator) {
return data.Contains(validator);
}
///
/// Removes the specified validator from the collection.
///
public void Remove(IValidator validator) {
data.Remove(validator);
}
///
/// Gets an enumerator that iterates over the collection.
///
public IEnumerator GetEnumerator() {
return data.GetEnumerator();
}
///
/// Copies a validator to the specified collection and location.
///
public void CopyTo(Array array, int index) {
for (IEnumerator e = this.GetEnumerator(); e.MoveNext();)
array.SetValue(e.Current, index++);
}
///
/// Indicates an object that can be used to synchronize the
/// .
/// This property is read-only.
///
public Object SyncRoot {
get { return this;}
}
///
/// Indicates whether the is read-only. This property is
/// read-only.
///
public bool IsReadOnly {
get { return false;}
}
///
/// Indicates whether the is synchronized
/// (thread-safe). This property is read-only.
///
public bool IsSynchronized {
get { return false;}
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- wmiprovider.cs
- CuspData.cs
- TimeSpanOrInfiniteConverter.cs
- ScriptDescriptor.cs
- UIElementAutomationPeer.cs
- AuthenticateEventArgs.cs
- NetNamedPipeBinding.cs
- VirtualPathProvider.cs
- DesignerActionVerbItem.cs
- LinqDataSourceDisposeEventArgs.cs
- XmlAttributes.cs
- PropertyFilterAttribute.cs
- RepeatBehaviorConverter.cs
- TokenBasedSet.cs
- KeyValuePairs.cs
- ActivityDesignerLayoutSerializers.cs
- WebDisplayNameAttribute.cs
- RenameRuleObjectDialog.Designer.cs
- WmpBitmapEncoder.cs
- ButtonFieldBase.cs
- HttpWriter.cs
- EnumerableRowCollectionExtensions.cs
- MimeObjectFactory.cs
- ProviderCollection.cs
- RequestNavigateEventArgs.cs
- TableLayoutPanelBehavior.cs
- NonBatchDirectoryCompiler.cs
- LayoutInformation.cs
- SettingsPropertyCollection.cs
- KeyTime.cs
- AnnotationResource.cs
- WebPartDescriptionCollection.cs
- TableLayoutStyle.cs
- xdrvalidator.cs
- CustomWebEventKey.cs
- PropertyState.cs
- SecurityTokenProvider.cs
- XPathSelfQuery.cs
- BCryptSafeHandles.cs
- TreeViewAutomationPeer.cs
- SystemIPInterfaceProperties.cs
- IdentityManager.cs
- _IPv4Address.cs
- HostProtectionException.cs
- TableLayoutSettingsTypeConverter.cs
- ToolCreatedEventArgs.cs
- TextFindEngine.cs
- TraceUtility.cs
- EnvironmentPermission.cs
- HashSetDebugView.cs
- TreeViewAutomationPeer.cs
- XmlSchemaCompilationSettings.cs
- LambdaCompiler.Statements.cs
- ReadOnlyCollectionBase.cs
- Control.cs
- HttpHostedTransportConfiguration.cs
- InputBinding.cs
- HttpWebRequest.cs
- ApplicationServiceManager.cs
- NumberFormatInfo.cs
- LabelDesigner.cs
- TileBrush.cs
- EventProxy.cs
- StorageEndPropertyMapping.cs
- IListConverters.cs
- FieldBuilder.cs
- ToggleButton.cs
- SystemColors.cs
- CodeAttributeArgument.cs
- LexicalChunk.cs
- XmlWriterDelegator.cs
- PersistenceProvider.cs
- COM2Enum.cs
- QueryOutputWriter.cs
- PermissionSetTriple.cs
- XmlReturnWriter.cs
- PasswordTextNavigator.cs
- ToolboxSnapDragDropEventArgs.cs
- SqlTypeSystemProvider.cs
- EntityObject.cs
- _ListenerAsyncResult.cs
- RegionData.cs
- ComboBoxRenderer.cs
- _AutoWebProxyScriptWrapper.cs
- ErrorRuntimeConfig.cs
- DesignerEventService.cs
- DockPanel.cs
- MetaType.cs
- Gdiplus.cs
- SQLMoney.cs
- ContextProperty.cs
- InvokeBinder.cs
- URLString.cs
- ReferencedCollectionType.cs
- RunInstallerAttribute.cs
- InvalidPrinterException.cs
- XmlILTrace.cs
- Table.cs
- SR.cs
- Button.cs