Code:
/ 4.0 / 4.0 / 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.
//------------------------------------------------------------------------------
//
// 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
- OleServicesContext.cs
- IteratorDescriptor.cs
- XPathBinder.cs
- WebServiceBindingAttribute.cs
- KeyTimeConverter.cs
- GridViewUpdatedEventArgs.cs
- CollectionChangedEventManager.cs
- Baml2006ReaderContext.cs
- UserControl.cs
- CompModSwitches.cs
- HtmlTableRowCollection.cs
- XNodeNavigator.cs
- MonikerSyntaxException.cs
- CodeBinaryOperatorExpression.cs
- ArrayList.cs
- BuildResultCache.cs
- CollectionChangeEventArgs.cs
- CompilerTypeWithParams.cs
- ActivitySurrogateSelector.cs
- _BaseOverlappedAsyncResult.cs
- Size3D.cs
- controlskin.cs
- AmbientEnvironment.cs
- EdmProviderManifest.cs
- ToolboxCategoryItems.cs
- LinkLabel.cs
- NumericUpDownAcceleration.cs
- Partitioner.cs
- DbModificationClause.cs
- Point3DAnimationBase.cs
- InkCanvasSelectionAdorner.cs
- NavigationHelper.cs
- PassportPrincipal.cs
- ModifierKeysConverter.cs
- Base64Decoder.cs
- XmlEnumAttribute.cs
- MessageProperties.cs
- TransformConverter.cs
- BezierSegment.cs
- DomainConstraint.cs
- ObjectNavigationPropertyMapping.cs
- UserControlAutomationPeer.cs
- Mappings.cs
- SpAudioStreamWrapper.cs
- JobInputBins.cs
- ObjectFullSpanRewriter.cs
- DataGridViewBand.cs
- UpdateRecord.cs
- Win32.cs
- Property.cs
- ContextProperty.cs
- CustomErrorsSection.cs
- CollectionViewProxy.cs
- CodeSnippetStatement.cs
- Msmq3PoisonHandler.cs
- DescendentsWalker.cs
- SQLInt16Storage.cs
- LassoHelper.cs
- ReaderWriterLockSlim.cs
- DateTime.cs
- CompositeCollectionView.cs
- TypeSource.cs
- HtmlPanelAdapter.cs
- ToolStripDesignerAvailabilityAttribute.cs
- AdCreatedEventArgs.cs
- CompiledQuery.cs
- GenericTextProperties.cs
- TreeBuilderXamlTranslator.cs
- HtmlHistory.cs
- FunctionMappingTranslator.cs
- HtmlElementEventArgs.cs
- ResponseStream.cs
- NodeInfo.cs
- XmlDataDocument.cs
- WebPartDisplayModeCollection.cs
- StylusPlugInCollection.cs
- PropertyPathWorker.cs
- WinEventHandler.cs
- XPathQilFactory.cs
- DetailsViewPageEventArgs.cs
- LineSegment.cs
- BaseCollection.cs
- ConnectionConsumerAttribute.cs
- ConnectionPoint.cs
- LineGeometry.cs
- OracleParameter.cs
- ResourceWriter.cs
- CollectionEditorDialog.cs
- ExpressionEvaluator.cs
- CharEnumerator.cs
- DockAndAnchorLayout.cs
- DesignerSerializationOptionsAttribute.cs
- ErrorLog.cs
- X509Utils.cs
- XmlExpressionDumper.cs
- SecurityTokenProvider.cs
- NullableLongMinMaxAggregationOperator.cs
- LogLogRecordEnumerator.cs
- PromptEventArgs.cs
- InstanceHandleReference.cs