Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Configuration / System / Configuration / IntegerValidatorAttribute.cs / 1305376 / IntegerValidatorAttribute.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 IntegerValidatorAttribute : ConfigurationValidatorAttribute { private int _min = int.MinValue; private int _max = int.MaxValue; private bool _excludeRange = false; public IntegerValidatorAttribute() { } public override ConfigurationValidatorBase ValidatorInstance { get { return new IntegerValidator(_min, _max, _excludeRange); } } public int MinValue { get { return _min; } set { if (_max < value) { throw new ArgumentOutOfRangeException("value", SR.GetString(SR.Validator_min_greater_than_max)); } _min = value; } } public int MaxValue { get { return _max; } set { if (_min > value) { throw new ArgumentOutOfRangeException("value", SR.GetString(SR.Validator_min_greater_than_max)); } _max = value; } } public bool ExcludeRange { get { return _excludeRange; } set { _excludeRange = 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
- Int32AnimationUsingKeyFrames.cs
- EventProviderWriter.cs
- ContractReference.cs
- GZipUtils.cs
- IDispatchConstantAttribute.cs
- Application.cs
- PropertyEmitterBase.cs
- ApplicationInfo.cs
- RtfFormatStack.cs
- MarshalByValueComponent.cs
- SHA256.cs
- Guid.cs
- EnumMember.cs
- HighlightOverlayGlyph.cs
- WebPartsPersonalizationAuthorization.cs
- ProfilePropertySettings.cs
- AppDomainAttributes.cs
- CommentEmitter.cs
- DataGridViewCellEventArgs.cs
- TemplateControlCodeDomTreeGenerator.cs
- ResourceManagerWrapper.cs
- URLBuilder.cs
- SymLanguageType.cs
- SoapAttributeOverrides.cs
- StrokeNodeEnumerator.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- TCPListener.cs
- DefaultAssemblyResolver.cs
- DesignBindingConverter.cs
- EntityProviderFactory.cs
- GridViewUpdatedEventArgs.cs
- Header.cs
- ZipIOExtraFieldElement.cs
- Point3DCollection.cs
- GroupQuery.cs
- _FtpDataStream.cs
- QuaternionConverter.cs
- _SecureChannel.cs
- AuthenticationService.cs
- EditorPartChrome.cs
- XamlToRtfWriter.cs
- ReadOnlyNameValueCollection.cs
- GridProviderWrapper.cs
- DependentList.cs
- SchemaElementLookUpTable.cs
- SqlProfileProvider.cs
- ConsumerConnectionPointCollection.cs
- GlyphsSerializer.cs
- RegexCaptureCollection.cs
- ProtocolImporter.cs
- WeakEventManager.cs
- WebPartConnectionsConnectVerb.cs
- Formatter.cs
- TriggerAction.cs
- Fonts.cs
- MemberAccessException.cs
- BoolLiteral.cs
- Utils.cs
- TimeSpanSecondsConverter.cs
- ReadOnlyMetadataCollection.cs
- CharUnicodeInfo.cs
- NavigationHelper.cs
- GACIdentityPermission.cs
- ClassGenerator.cs
- StackSpiller.Temps.cs
- XPathConvert.cs
- Token.cs
- RepeatInfo.cs
- PnrpPermission.cs
- PreloadedPackages.cs
- XmlSchemaElement.cs
- XmlMembersMapping.cs
- XmlDocumentSerializer.cs
- AnonymousIdentificationSection.cs
- BaseParagraph.cs
- XmlBoundElement.cs
- CodePageEncoding.cs
- ResourcesGenerator.cs
- UserControl.cs
- TemplateBindingExpression.cs
- EnumValAlphaComparer.cs
- Filter.cs
- InvokePatternIdentifiers.cs
- SafeIUnknown.cs
- Journal.cs
- DetailsViewRow.cs
- ReadWriteObjectLock.cs
- CustomErrorsSectionWrapper.cs
- ContextInformation.cs
- MemberBinding.cs
- OleDbErrorCollection.cs
- GroupItemAutomationPeer.cs
- PointAnimationUsingKeyFrames.cs
- LogPolicy.cs
- CodeCompiler.cs
- Attributes.cs
- KeysConverter.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- NullableDecimalSumAggregationOperator.cs
- SimpleType.cs