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
- XsdBuildProvider.cs
- tooltip.cs
- EventManager.cs
- Binding.cs
- HttpStreams.cs
- StructuredTypeEmitter.cs
- DesignerSerializationManager.cs
- safelinkcollection.cs
- DataMember.cs
- AccessedThroughPropertyAttribute.cs
- FilterQueryOptionExpression.cs
- Latin1Encoding.cs
- BooleanConverter.cs
- AutomationTextAttribute.cs
- ILGenerator.cs
- METAHEADER.cs
- DataListCommandEventArgs.cs
- GridViewColumnCollection.cs
- ToolboxDataAttribute.cs
- GCHandleCookieTable.cs
- DataTransferEventArgs.cs
- CredentialCache.cs
- UnsafeNativeMethods.cs
- PropertyValueChangedEvent.cs
- SchemaImporterExtensionElementCollection.cs
- PageContent.cs
- FloatMinMaxAggregationOperator.cs
- TraceContextEventArgs.cs
- SafeReversePInvokeHandle.cs
- ClusterSafeNativeMethods.cs
- CurrentChangingEventManager.cs
- WebPartMinimizeVerb.cs
- DefaultAsyncDataDispatcher.cs
- QilPatternVisitor.cs
- RectKeyFrameCollection.cs
- UrlUtility.cs
- DateTimeParse.cs
- XmlSerializerSection.cs
- ZipIOLocalFileBlock.cs
- ZipIOFileItemStream.cs
- DefaultEventAttribute.cs
- Brush.cs
- PeerCollaborationPermission.cs
- VBCodeProvider.cs
- LineUtil.cs
- SiteMapDataSource.cs
- ComponentCollection.cs
- ObjectDataSourceView.cs
- NoResizeHandleGlyph.cs
- Matrix3DValueSerializer.cs
- TouchEventArgs.cs
- TransactionScopeDesigner.cs
- CustomWebEventKey.cs
- _UncName.cs
- DivideByZeroException.cs
- XPathNodeList.cs
- NameNode.cs
- RecordManager.cs
- SignedPkcs7.cs
- AdjustableArrowCap.cs
- CatalogPartChrome.cs
- Margins.cs
- ImageListStreamer.cs
- AppearanceEditorPart.cs
- SafeThemeHandle.cs
- WebUtil.cs
- BaseHashHelper.cs
- MetadataFile.cs
- MetadataItemSerializer.cs
- MsmqIntegrationSecurityElement.cs
- Path.cs
- ReferencedType.cs
- SerializationUtilities.cs
- TaskFileService.cs
- arabicshape.cs
- UIElementHelper.cs
- SystemEvents.cs
- OverlappedContext.cs
- VirtualPathUtility.cs
- COSERVERINFO.cs
- XmlSchemaInferenceException.cs
- EntityDesignerDataSourceView.cs
- DataListGeneralPage.cs
- WebPageTraceListener.cs
- DirectoryInfo.cs
- FusionWrap.cs
- ApplicationActivator.cs
- ItemsControlAutomationPeer.cs
- QueryOperatorEnumerator.cs
- QilTernary.cs
- ParallelEnumerable.cs
- DocumentXPathNavigator.cs
- QueryResult.cs
- WCFServiceClientProxyGenerator.cs
- compensatingcollection.cs
- BinaryKeyIdentifierClause.cs
- SingleAnimationUsingKeyFrames.cs
- LinqDataSourceDeleteEventArgs.cs
- SecurityHeaderLayout.cs
- TypedReference.cs