Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Configuration / System / Configuration / StringValidatorAttribute.cs / 1305376 / StringValidatorAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.Configuration.Internal; using System.Collections; using System.Collections.Specialized; using System.Collections.Generic; using System.IO; using System.Reflection; using System.Security.Permissions; using System.Xml; using System.Globalization; using System.ComponentModel; using System.Security; using System.Text; namespace System.Configuration { [AttributeUsage(AttributeTargets.Property)] public sealed class StringValidatorAttribute : ConfigurationValidatorAttribute { private int _minLength = 0; private int _maxLength = int.MaxValue; private string _invalidChars; public StringValidatorAttribute() { } public override ConfigurationValidatorBase ValidatorInstance { get { return new StringValidator(_minLength, _maxLength, _invalidChars); } } public int MinLength { get { return _minLength; } set { if (_maxLength < value) { throw new ArgumentOutOfRangeException("value", SR.GetString(SR.Validator_min_greater_than_max)); } _minLength = value; } } public int MaxLength { get { return _maxLength; } set { if (_minLength > value) { throw new ArgumentOutOfRangeException("value", SR.GetString(SR.Validator_min_greater_than_max)); } _maxLength = value; } } public string InvalidCharacters { get { return _invalidChars; } set { _invalidChars = value; } } } } // 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
- XPathNodeList.cs
- Rect.cs
- Stopwatch.cs
- WrappedIUnknown.cs
- DocumentApplicationJournalEntry.cs
- DataControlFieldCell.cs
- HttpListenerPrefixCollection.cs
- ValidationUtility.cs
- MarkupExtensionSerializer.cs
- SymbolDocumentInfo.cs
- ToolStripDropDownClosedEventArgs.cs
- QueryOperationResponseOfT.cs
- MouseDevice.cs
- SessionEndingCancelEventArgs.cs
- ImageMapEventArgs.cs
- DataGridViewRowEventArgs.cs
- EditorPart.cs
- OrCondition.cs
- MenuItem.cs
- EditingCommands.cs
- FileDialog.cs
- WebControlAdapter.cs
- _SslState.cs
- _HelperAsyncResults.cs
- Blend.cs
- ConnectionOrientedTransportManager.cs
- FillErrorEventArgs.cs
- Attributes.cs
- TextProviderWrapper.cs
- TypedServiceChannelBuilder.cs
- RadioButton.cs
- HMACMD5.cs
- EntityViewGenerationConstants.cs
- NullableLongAverageAggregationOperator.cs
- Message.cs
- ErrorEventArgs.cs
- HttpContext.cs
- recordstatefactory.cs
- InstanceKeyView.cs
- shaperfactory.cs
- XmlCountingReader.cs
- UnsafeNativeMethods.cs
- BufferBuilder.cs
- InputProcessorProfilesLoader.cs
- TrustLevel.cs
- TextSimpleMarkerProperties.cs
- MouseActionValueSerializer.cs
- BoundConstants.cs
- storepermissionattribute.cs
- WsdlInspector.cs
- SqlReferenceCollection.cs
- NullableDecimalAverageAggregationOperator.cs
- MessageFilter.cs
- IERequestCache.cs
- TransformerInfoCollection.cs
- StandardBindingCollectionElement.cs
- DrawingCollection.cs
- _ListenerAsyncResult.cs
- NavigationHelper.cs
- TextServicesCompartment.cs
- TreeChangeInfo.cs
- ImpersonationContext.cs
- DelimitedListTraceListener.cs
- Coordinator.cs
- PathFigureCollectionConverter.cs
- TableLayoutPanelBehavior.cs
- Rss20ItemFormatter.cs
- WorkflowInstanceProxy.cs
- SiteMapNodeCollection.cs
- FileVersion.cs
- InputLanguageSource.cs
- SequentialOutput.cs
- FileFormatException.cs
- BaseAsyncResult.cs
- MutexSecurity.cs
- MenuItem.cs
- Walker.cs
- FlowLayoutPanel.cs
- IdentitySection.cs
- XmlSchemaValidator.cs
- InplaceBitmapMetadataWriter.cs
- WaitHandle.cs
- InternalResources.cs
- WebScriptEndpointElement.cs
- DataGridViewTopLeftHeaderCell.cs
- ObjectDataSourceDisposingEventArgs.cs
- SimpleLine.cs
- CellTreeNodeVisitors.cs
- Control.cs
- HttpCapabilitiesEvaluator.cs
- DateTimeSerializationSection.cs
- SlipBehavior.cs
- WebHttpSecurity.cs
- ListBase.cs
- ExpandableObjectConverter.cs
- DashStyle.cs
- ProfileGroupSettingsCollection.cs
- FrameSecurityDescriptor.cs
- StoreItemCollection.Loader.cs
- MaterialCollection.cs