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
- NamespaceInfo.cs
- StandardMenuStripVerb.cs
- AuthenticationSection.cs
- GenericsInstances.cs
- RelationshipWrapper.cs
- NamespaceEmitter.cs
- DataGridColumnHeaderAutomationPeer.cs
- ColorAnimationBase.cs
- cache.cs
- AspNetCacheProfileAttribute.cs
- Error.cs
- TextElementEditingBehaviorAttribute.cs
- ConfigurationValidatorAttribute.cs
- ResourceType.cs
- FixUp.cs
- Substitution.cs
- CodeAttributeArgument.cs
- Select.cs
- ReadOnlyDictionary.cs
- WebBrowserContainer.cs
- RequestUriProcessor.cs
- DataGridLength.cs
- RadioButton.cs
- BufferBuilder.cs
- ArrayConverter.cs
- StackSpiller.Generated.cs
- HtmlInputHidden.cs
- FrameworkContentElementAutomationPeer.cs
- MorphHelper.cs
- XmlSchemaCollection.cs
- InnerItemCollectionView.cs
- Scene3D.cs
- RemotingConfiguration.cs
- DoubleAnimationBase.cs
- FileDetails.cs
- VBIdentifierDesigner.xaml.cs
- InternalMappingException.cs
- MetadataProperty.cs
- ProjectionCamera.cs
- SynchronizationContext.cs
- VectorValueSerializer.cs
- FileEnumerator.cs
- WebResourceAttribute.cs
- WebServiceParameterData.cs
- TextTreeInsertUndoUnit.cs
- PersistenceProviderDirectory.cs
- BufferBuilder.cs
- DomNameTable.cs
- FontFamilyIdentifier.cs
- MatrixTransform.cs
- TextClipboardData.cs
- COM2ComponentEditor.cs
- SamlAuthorityBinding.cs
- MouseGestureValueSerializer.cs
- PathSegmentCollection.cs
- InvokePatternIdentifiers.cs
- PopupControlService.cs
- DbExpressionBuilder.cs
- PersianCalendar.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- CoreChannel.cs
- SqlTriggerAttribute.cs
- BaseCollection.cs
- CuspData.cs
- ObjectListDesigner.cs
- TextBreakpoint.cs
- ConfigurationPropertyCollection.cs
- XmlSchemaElement.cs
- ChooseAction.cs
- BridgeDataReader.cs
- ManualResetEvent.cs
- UriExt.cs
- SqlStatistics.cs
- SpanIndex.cs
- HandlerFactoryWrapper.cs
- PeerObject.cs
- TraceHwndHost.cs
- ReverseQueryOperator.cs
- ZipIOLocalFileBlock.cs
- HandlerFactoryWrapper.cs
- Block.cs
- _NegoStream.cs
- DataKeyCollection.cs
- ExpressionBuilder.cs
- ToolStripControlHost.cs
- InvokeGenerator.cs
- XPathNavigatorKeyComparer.cs
- CodeObject.cs
- InsufficientMemoryException.cs
- CmsUtils.cs
- WrappedKeySecurityTokenParameters.cs
- LoginView.cs
- MappedMetaModel.cs
- RepeaterItem.cs
- ZoneLinkButton.cs
- DeferredReference.cs
- PasswordBoxAutomationPeer.cs
- DoubleCollectionConverter.cs
- WebWorkflowRole.cs
- UnsafeNetInfoNativeMethods.cs