Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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;}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PropertyInformationCollection.cs
- OptimalBreakSession.cs
- AnnotationResourceCollection.cs
- ClientSponsor.cs
- ClientFormsAuthenticationCredentials.cs
- CodeVariableReferenceExpression.cs
- _DigestClient.cs
- LayoutEngine.cs
- DataGridViewBindingCompleteEventArgs.cs
- StyleHelper.cs
- RelatedEnd.cs
- TargetConverter.cs
- IsolatedStoragePermission.cs
- CodeSnippetCompileUnit.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- Enlistment.cs
- XmlQueryCardinality.cs
- BlurBitmapEffect.cs
- TrueReadOnlyCollection.cs
- DataServiceProviderMethods.cs
- OutputScopeManager.cs
- X509Certificate2Collection.cs
- GeometryGroup.cs
- ArgumentValidation.cs
- Native.cs
- ClaimTypes.cs
- GetMemberBinder.cs
- sqlstateclientmanager.cs
- ParameterInfo.cs
- DebugManager.cs
- XmlDigitalSignatureProcessor.cs
- DiagnosticTraceSource.cs
- UnicastIPAddressInformationCollection.cs
- ComponentResourceKeyConverter.cs
- PageThemeCodeDomTreeGenerator.cs
- AssociationEndMember.cs
- FontSourceCollection.cs
- DataGridViewAutoSizeModeEventArgs.cs
- __TransparentProxy.cs
- MenuItemBinding.cs
- Operator.cs
- XmlUtil.cs
- SerializationException.cs
- LayoutEngine.cs
- DateTimeValueSerializer.cs
- DataTableCollection.cs
- XmlAnyElementAttribute.cs
- formatter.cs
- SessionState.cs
- LockCookie.cs
- PointConverter.cs
- DataBinder.cs
- ArrayTypeMismatchException.cs
- SecurityTokenAuthenticator.cs
- Screen.cs
- PointLightBase.cs
- MetadataUtil.cs
- Model3DCollection.cs
- StateWorkerRequest.cs
- DependencyObjectType.cs
- OperationCanceledException.cs
- XmlSerializationWriter.cs
- PageContent.cs
- CounterSampleCalculator.cs
- Codec.cs
- DockProviderWrapper.cs
- DelayedRegex.cs
- PointF.cs
- ObjectTag.cs
- MemoryRecordBuffer.cs
- SQLDateTimeStorage.cs
- DataGridViewRowHeaderCell.cs
- _NegotiateClient.cs
- SchemaNotation.cs
- SelectionHighlightInfo.cs
- XhtmlMobileTextWriter.cs
- TransactionManagerProxy.cs
- RichTextBoxConstants.cs
- HorizontalAlignConverter.cs
- Message.cs
- TextBlock.cs
- PngBitmapEncoder.cs
- DataContractJsonSerializer.cs
- ScrollBarRenderer.cs
- ViewGenResults.cs
- ScriptReference.cs
- WindowsTreeView.cs
- StreamResourceInfo.cs
- PropertyItem.cs
- cache.cs
- SqlDataSourceSelectingEventArgs.cs
- ComponentSerializationService.cs
- RegistryPermission.cs
- FontSource.cs
- XmlSchemaIdentityConstraint.cs
- TextTreeObjectNode.cs
- DataMemberConverter.cs
- InputManager.cs
- DateTimeUtil.cs
- ManifestResourceInfo.cs