Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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.
//
//-----------------------------------------------------------------------------
/*
*/
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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Animatable.cs
- UseLicense.cs
- DataGridViewCellPaintingEventArgs.cs
- HttpListenerException.cs
- NumericPagerField.cs
- COM2EnumConverter.cs
- ConfigurationStrings.cs
- NumberFormatter.cs
- RegexRunner.cs
- AxisAngleRotation3D.cs
- PathParser.cs
- BuildProviderUtils.cs
- PointLight.cs
- NameValuePermission.cs
- EndpointDesigner.cs
- ImmutableAssemblyCacheEntry.cs
- MenuItemStyle.cs
- ListViewDataItem.cs
- ImmComposition.cs
- EventLogPermissionEntryCollection.cs
- TextTreeText.cs
- ManagementPath.cs
- WindowsListViewScroll.cs
- AbstractDataSvcMapFileLoader.cs
- LabelInfo.cs
- QilValidationVisitor.cs
- ParseNumbers.cs
- DBDataPermissionAttribute.cs
- OptimizedTemplateContentHelper.cs
- TemplateField.cs
- ToolStripItemImageRenderEventArgs.cs
- KeyInterop.cs
- TraceSwitch.cs
- ServiceMemoryGates.cs
- ExtractorMetadata.cs
- ModelPropertyDescriptor.cs
- SpStreamWrapper.cs
- RegisterResponseInfo.cs
- LinqExpressionNormalizer.cs
- CacheVirtualItemsEvent.cs
- ProcessHostFactoryHelper.cs
- XmlExpressionDumper.cs
- Point3DCollection.cs
- RegexCaptureCollection.cs
- RegistryPermission.cs
- FamilyTypefaceCollection.cs
- ManipulationCompletedEventArgs.cs
- Simplifier.cs
- OdbcTransaction.cs
- EncodingTable.cs
- NativeStructs.cs
- CatalogZoneBase.cs
- ErrorStyle.cs
- ControlBuilder.cs
- HideDisabledControlAdapter.cs
- _ListenerRequestStream.cs
- RangeExpression.cs
- SizeChangedInfo.cs
- bidPrivateBase.cs
- GeneralTransform3D.cs
- bidPrivateBase.cs
- SqlUserDefinedTypeAttribute.cs
- AbandonedMutexException.cs
- WindowsGraphics.cs
- DPTypeDescriptorContext.cs
- ThicknessAnimationBase.cs
- SizeLimitedCache.cs
- XmlUrlResolver.cs
- ExpandoObject.cs
- WebPartEditVerb.cs
- MouseActionValueSerializer.cs
- WsdlBuildProvider.cs
- OperatingSystem.cs
- UIPermission.cs
- DragEventArgs.cs
- TextEditorSelection.cs
- CodeCatchClauseCollection.cs
- Merger.cs
- BufferedGraphicsContext.cs
- DataSourceListEditor.cs
- RegistrationServices.cs
- Timeline.cs
- TextBlock.cs
- ControlCollection.cs
- XpsInterleavingPolicy.cs
- InternalRelationshipCollection.cs
- PrintDialogException.cs
- TextServicesProperty.cs
- ConstNode.cs
- SqlRetyper.cs
- assertwrapper.cs
- EventMappingSettings.cs
- XmlSchemaInferenceException.cs
- LayoutEngine.cs
- QueryResultOp.cs
- PrePostDescendentsWalker.cs
- RegularExpressionValidator.cs
- DataPager.cs
- LocalFileSettingsProvider.cs
- DeclarativeConditionsCollection.cs