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
- BuildResultCache.cs
- FileSecurity.cs
- HttpPostedFileBase.cs
- DataTableClearEvent.cs
- CompositeCollection.cs
- GlyphRunDrawing.cs
- ObjectDisposedException.cs
- GridItemCollection.cs
- Storyboard.cs
- Underline.cs
- ConfigXmlReader.cs
- SortedSetDebugView.cs
- XamlInt32CollectionSerializer.cs
- OleDbFactory.cs
- DynamicResourceExtension.cs
- CodeDefaultValueExpression.cs
- MouseCaptureWithinProperty.cs
- __Filters.cs
- ElementInit.cs
- FolderBrowserDialogDesigner.cs
- FixedSOMSemanticBox.cs
- WindowsButton.cs
- FacetEnabledSchemaElement.cs
- TripleDES.cs
- TypeBuilderInstantiation.cs
- Select.cs
- DefaultAuthorizationContext.cs
- WindowHelperService.cs
- WindowsImpersonationContext.cs
- SqlParameterCollection.cs
- DtdParser.cs
- RangeContentEnumerator.cs
- TransformationRules.cs
- ControlAdapter.cs
- DataGridViewTopLeftHeaderCell.cs
- RNGCryptoServiceProvider.cs
- SerTrace.cs
- Facet.cs
- RuntimeConfig.cs
- BoundField.cs
- MessageSecurityOverTcp.cs
- HostVisual.cs
- InkCanvasInnerCanvas.cs
- BulletedList.cs
- CultureTableRecord.cs
- StatusStrip.cs
- MapPathBasedVirtualPathProvider.cs
- DataGridCaption.cs
- Normalizer.cs
- RelationshipSet.cs
- SHA512Cng.cs
- SpotLight.cs
- SymbolMethod.cs
- WebPartManagerInternals.cs
- ToolStripPanel.cs
- BufferBuilder.cs
- UnsafeCollabNativeMethods.cs
- SiteMapDataSourceView.cs
- PagesChangedEventArgs.cs
- Filter.cs
- WhitespaceRule.cs
- ServiceContractGenerationContext.cs
- WSSecurityPolicy12.cs
- URLEditor.cs
- DispatcherSynchronizationContext.cs
- BridgeDataRecord.cs
- Screen.cs
- TextTreeInsertUndoUnit.cs
- PersistenceTypeAttribute.cs
- ConnectorSelectionGlyph.cs
- Splitter.cs
- ComplusEndpointConfigContainer.cs
- DisplayNameAttribute.cs
- ControlBuilderAttribute.cs
- SHA256.cs
- SQLInt32Storage.cs
- NativeMethods.cs
- StrongNameKeyPair.cs
- DataServiceClientException.cs
- SqlDataSourceFilteringEventArgs.cs
- DataGridTextBoxColumn.cs
- WebRequestModuleElement.cs
- RuntimeWrappedException.cs
- OpacityConverter.cs
- CookielessHelper.cs
- HtmlMeta.cs
- GroupQuery.cs
- Substitution.cs
- OpCellTreeNode.cs
- SqlCacheDependencyDatabase.cs
- VisualStyleRenderer.cs
- InitialServerConnectionReader.cs
- WebPartMovingEventArgs.cs
- wpf-etw.cs
- Window.cs
- SamlAuthenticationClaimResource.cs
- BasicViewGenerator.cs
- DefaultPrintController.cs
- AtomContentProperty.cs
- Permission.cs