Code:
/ FX-1434 / FX-1434 / 1.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
- TextRunTypographyProperties.cs
- DefaultAsyncDataDispatcher.cs
- Odbc32.cs
- Parsers.cs
- Matrix3DConverter.cs
- CompositionTarget.cs
- XmlSchemaProviderAttribute.cs
- SqlTrackingWorkflowInstance.cs
- TempEnvironment.cs
- TextBlock.cs
- SelectionService.cs
- BinaryObjectInfo.cs
- XmlDocument.cs
- BinaryWriter.cs
- EndPoint.cs
- Barrier.cs
- ProcessModuleDesigner.cs
- CompilerScope.Storage.cs
- StaticDataManager.cs
- SqlNotificationEventArgs.cs
- WindowsPen.cs
- ApplicationHost.cs
- XmlObjectSerializerReadContextComplexJson.cs
- ToolStripPanelRenderEventArgs.cs
- WebBrowserContainer.cs
- DocumentPaginator.cs
- XmlSchemaSimpleType.cs
- ToolStripGripRenderEventArgs.cs
- ValueTypeFixupInfo.cs
- filewebresponse.cs
- StylusPointProperties.cs
- ColorBlend.cs
- ThemeDirectoryCompiler.cs
- NamedPipeConnectionPoolSettings.cs
- AppSettingsReader.cs
- AsymmetricSignatureDeformatter.cs
- SqlReorderer.cs
- VisualBasicSettingsHandler.cs
- Table.cs
- DivideByZeroException.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- AnnotationResourceChangedEventArgs.cs
- baseshape.cs
- XamlTemplateSerializer.cs
- DataGridViewLinkCell.cs
- GuidConverter.cs
- AppDomainUnloadedException.cs
- XmlDigitalSignatureProcessor.cs
- PkcsMisc.cs
- TextSerializer.cs
- WebConfigurationHostFileChange.cs
- BinHexEncoder.cs
- MenuBase.cs
- MutexSecurity.cs
- FontFamily.cs
- BlockUIContainer.cs
- SiteMapNodeItem.cs
- CapabilitiesPattern.cs
- HebrewNumber.cs
- QualifierSet.cs
- SharedPersonalizationStateInfo.cs
- EllipticalNodeOperations.cs
- CompositeCollectionView.cs
- Visual.cs
- RowUpdatedEventArgs.cs
- SmiGettersStream.cs
- FieldNameLookup.cs
- NetworkInterface.cs
- ClientBuildManagerCallback.cs
- DataSourceCacheDurationConverter.cs
- ObjectTag.cs
- TextSelection.cs
- LocationReference.cs
- CompletedAsyncResult.cs
- QilXmlWriter.cs
- DataRelationPropertyDescriptor.cs
- IdentityReference.cs
- MimeParameter.cs
- ImageCodecInfoPrivate.cs
- CultureMapper.cs
- QilSortKey.cs
- IntersectQueryOperator.cs
- ProgressChangedEventArgs.cs
- SmtpCommands.cs
- Mapping.cs
- FontSourceCollection.cs
- EmptyArray.cs
- CompositeActivityDesigner.cs
- followingsibling.cs
- MetadataProperty.cs
- XmlSchemaSequence.cs
- MultipleViewPattern.cs
- ResourceContainer.cs
- SafeFileMappingHandle.cs
- ExpressionVisitor.cs
- Evaluator.cs
- ScriptRegistrationManager.cs
- ManagedWndProcTracker.cs
- HitTestResult.cs
- Substitution.cs