Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / ValidatorCollection.cs / 1305376 / ValidatorCollection.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace System.Web.UI {
using System.Runtime.InteropServices;
using System.Collections;
///
/// Exposes a
/// read-only array of
/// references.
///
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;}
}
}
}
// 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
- URLMembershipCondition.cs
- AddingNewEventArgs.cs
- NavigateEvent.cs
- DispatcherExceptionFilterEventArgs.cs
- newitemfactory.cs
- ListParaClient.cs
- IItemProperties.cs
- StagingAreaInputItem.cs
- LogicalTreeHelper.cs
- SecurityMode.cs
- Int64.cs
- TypeConverters.cs
- HandlerBase.cs
- PEFileEvidenceFactory.cs
- CommandDesigner.cs
- ProtocolViolationException.cs
- DBSqlParserTable.cs
- ImageFormat.cs
- BitmapFrameDecode.cs
- IDispatchConstantAttribute.cs
- basenumberconverter.cs
- Attribute.cs
- DataAccessor.cs
- IISUnsafeMethods.cs
- ParentUndoUnit.cs
- RtfToken.cs
- Int32RectValueSerializer.cs
- CoTaskMemSafeHandle.cs
- BaseCollection.cs
- Point3DConverter.cs
- VariableQuery.cs
- FileSystemEventArgs.cs
- WebPermission.cs
- EmptyEnumerable.cs
- NetWebProxyFinder.cs
- _ContextAwareResult.cs
- ProtocolViolationException.cs
- OutputCacheProfileCollection.cs
- ObjectReaderCompiler.cs
- LayoutUtils.cs
- HtmlToClrEventProxy.cs
- Rect.cs
- Binding.cs
- PartitionResolver.cs
- Aggregates.cs
- NameSpaceExtractor.cs
- WorkflowMarkupSerializationException.cs
- StreamResourceInfo.cs
- ContentFileHelper.cs
- WebPartConnectionsCancelVerb.cs
- MonthChangedEventArgs.cs
- Metafile.cs
- ProgressBarAutomationPeer.cs
- PrintingPermission.cs
- SplineQuaternionKeyFrame.cs
- ModuleConfigurationInfo.cs
- TransformedBitmap.cs
- RemoteWebConfigurationHostServer.cs
- TextBox.cs
- RectangleGeometry.cs
- ServiceReflector.cs
- Win32SafeHandles.cs
- Utility.cs
- WebConfigurationFileMap.cs
- FillBehavior.cs
- ListViewCancelEventArgs.cs
- OleDbStruct.cs
- Point4D.cs
- XmlSchemaAny.cs
- ButtonChrome.cs
- MeshGeometry3D.cs
- InvalidOleVariantTypeException.cs
- FlagsAttribute.cs
- LinqDataSourceEditData.cs
- SettingsContext.cs
- WebSysDisplayNameAttribute.cs
- Converter.cs
- CancellableEnumerable.cs
- UniqueEventHelper.cs
- RouteTable.cs
- ResourceDefaultValueAttribute.cs
- RoleManagerSection.cs
- TextSelectionHelper.cs
- TaskExceptionHolder.cs
- Avt.cs
- WebPageTraceListener.cs
- DataContractJsonSerializer.cs
- MethodBody.cs
- baseaxisquery.cs
- DataServiceQueryProvider.cs
- ClientFormsAuthenticationCredentials.cs
- MasterPageBuildProvider.cs
- NotFiniteNumberException.cs
- XsltSettings.cs
- ListChangedEventArgs.cs
- WorkflowFormatterBehavior.cs
- SolidBrush.cs
- Focus.cs
- ZoneLinkButton.cs
- ChooseAction.cs