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
- MouseGestureValueSerializer.cs
- ConfigurationLockCollection.cs
- Triangle.cs
- CTreeGenerator.cs
- DataTableTypeConverter.cs
- SinglePageViewer.cs
- KnownBoxes.cs
- Errors.cs
- RotateTransform.cs
- SyndicationFeedFormatter.cs
- AvtEvent.cs
- WindowsGraphics2.cs
- ConstructorNeedsTagAttribute.cs
- UserInitiatedRoutedEventPermission.cs
- SettingsPropertyNotFoundException.cs
- UrlMapping.cs
- GeneralTransform2DTo3DTo2D.cs
- PriorityQueue.cs
- TimelineClockCollection.cs
- DependencyPropertyConverter.cs
- SqlDataSourceStatusEventArgs.cs
- ExpressionSelection.cs
- ConnectionManagementSection.cs
- DPCustomTypeDescriptor.cs
- AsyncOperation.cs
- PowerModeChangedEventArgs.cs
- TextPatternIdentifiers.cs
- HTTPNotFoundHandler.cs
- CancellationTokenRegistration.cs
- SelectedGridItemChangedEvent.cs
- NamespaceQuery.cs
- CompilerGeneratedAttribute.cs
- MarkupWriter.cs
- ByteStreamGeometryContext.cs
- ExtractorMetadata.cs
- ZipIOLocalFileDataDescriptor.cs
- TaskHelper.cs
- CancelAsyncOperationRequest.cs
- StringDictionary.cs
- MachineKeyConverter.cs
- DataServiceRequest.cs
- Rotation3DKeyFrameCollection.cs
- XmlNodeReader.cs
- MultiByteCodec.cs
- PaintEvent.cs
- WebPartMinimizeVerb.cs
- SqlParameterizer.cs
- Rectangle.cs
- DropShadowEffect.cs
- SettingsProperty.cs
- JobCollate.cs
- IgnoreFileBuildProvider.cs
- EmbeddedMailObjectCollectionEditor.cs
- EntityDesignerUtils.cs
- xsdvalidator.cs
- XmlSchemaValidationException.cs
- IsolatedStorageException.cs
- AspProxy.cs
- RectValueSerializer.cs
- XamlStream.cs
- SqlProfileProvider.cs
- BitmapEffectDrawingContextState.cs
- ProviderIncompatibleException.cs
- shaperfactory.cs
- HttpFileCollectionWrapper.cs
- RegexCaptureCollection.cs
- Pair.cs
- ExpressionBinding.cs
- SqlCharStream.cs
- BitStream.cs
- ResetableIterator.cs
- ZipIOLocalFileBlock.cs
- RemotingSurrogateSelector.cs
- InitiatorServiceModelSecurityTokenRequirement.cs
- EdmItemError.cs
- ExtensionFile.cs
- FileBasedResourceGroveler.cs
- InProcStateClientManager.cs
- LogEntryHeaderv1Deserializer.cs
- MenuAutoFormat.cs
- SystemSounds.cs
- ConnectionStringsExpressionBuilder.cs
- DataPagerFieldItem.cs
- LOSFormatter.cs
- EntityDataSourceSelectedEventArgs.cs
- DbgUtil.cs
- XslTransform.cs
- WindowsStartMenu.cs
- WorkflowViewStateService.cs
- XpsFontSubsetter.cs
- HttpContextServiceHost.cs
- MenuScrollingVisibilityConverter.cs
- DocumentApplication.cs
- VisualBasicSettings.cs
- xml.cs
- EditingMode.cs
- TypedElement.cs
- EpmContentDeSerializer.cs
- SrgsRule.cs
- SystemIPv4InterfaceProperties.cs