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
- X509UI.cs
- RbTree.cs
- InputElement.cs
- Int16Storage.cs
- LinkLabelLinkClickedEvent.cs
- MetadataUtil.cs
- handlecollector.cs
- SelectorAutomationPeer.cs
- RoleManagerModule.cs
- TransformedBitmap.cs
- TextAdaptor.cs
- WindowsBrush.cs
- DynamicHyperLink.cs
- BlurBitmapEffect.cs
- Select.cs
- Wildcard.cs
- PrintDialogDesigner.cs
- AsyncResult.cs
- ElapsedEventArgs.cs
- OleDbErrorCollection.cs
- OracleBinary.cs
- Int32AnimationBase.cs
- OracleDataAdapter.cs
- SizeConverter.cs
- AuthenticationService.cs
- _TLSstream.cs
- GenerateHelper.cs
- WorkflowFileItem.cs
- Block.cs
- TimeEnumHelper.cs
- NamespaceInfo.cs
- DateTime.cs
- VectorCollectionConverter.cs
- ObjectHelper.cs
- BufferManager.cs
- UrlSyndicationContent.cs
- GridViewColumn.cs
- PeerTransportSecuritySettings.cs
- XsltException.cs
- ZoomPercentageConverter.cs
- ReceiveMessageRecord.cs
- SqlExpander.cs
- TypeDescriptionProvider.cs
- DataGridCell.cs
- HttpProcessUtility.cs
- XhtmlBasicControlAdapter.cs
- StronglyTypedResourceBuilder.cs
- GroupBoxRenderer.cs
- RolePrincipal.cs
- TypeInformation.cs
- SpeakProgressEventArgs.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- ModuleBuilderData.cs
- HtmlInputRadioButton.cs
- BitmapEffectDrawing.cs
- RenderTargetBitmap.cs
- PersonalizationAdministration.cs
- Boolean.cs
- ImageMap.cs
- HttpClientCertificate.cs
- ContextMenu.cs
- KeyConverter.cs
- StringArrayConverter.cs
- DecoratedNameAttribute.cs
- ACL.cs
- DeleteIndexBinder.cs
- Typeface.cs
- VirtualDirectoryMappingCollection.cs
- CurrentChangingEventManager.cs
- ZeroOpNode.cs
- CustomPopupPlacement.cs
- PasswordDeriveBytes.cs
- SQLConvert.cs
- XmlSchemaDatatype.cs
- VerificationAttribute.cs
- WebBrowser.cs
- WebPartEditorCancelVerb.cs
- Clock.cs
- FrameworkReadOnlyPropertyMetadata.cs
- DebugTrace.cs
- ExpandSegmentCollection.cs
- XmlDictionaryReader.cs
- WorkflowMessageEventHandler.cs
- SchemaContext.cs
- X500Name.cs
- KeyedCollection.cs
- BulletedListEventArgs.cs
- WindowsContainer.cs
- SplitterCancelEvent.cs
- GlyphsSerializer.cs
- X509IssuerSerialKeyIdentifierClause.cs
- PrintPreviewDialog.cs
- PrintDocument.cs
- XmlTypeMapping.cs
- XmlDocumentFragment.cs
- PolygonHotSpot.cs
- ObjectListCommandsPage.cs
- WindowShowOrOpenTracker.cs
- BlobPersonalizationState.cs
- DuplexClientBase.cs