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
- SmiXetterAccessMap.cs
- RtfControls.cs
- TextRangeProviderWrapper.cs
- XmlAnyElementAttribute.cs
- ComplexBindingPropertiesAttribute.cs
- CompiledRegexRunnerFactory.cs
- loginstatus.cs
- BlurBitmapEffect.cs
- SoapAttributeOverrides.cs
- ProjectionPlanCompiler.cs
- FormsAuthenticationConfiguration.cs
- BuildResult.cs
- ExclusiveTcpListener.cs
- HtmlLabelAdapter.cs
- CalendarDateRangeChangingEventArgs.cs
- MediaPlayer.cs
- TrustDriver.cs
- FacetValues.cs
- WebServiceErrorEvent.cs
- EndpointAddressElementBase.cs
- ExecutionContext.cs
- CloudCollection.cs
- ClientScriptManager.cs
- CodeAccessSecurityEngine.cs
- SessionState.cs
- ToolStripItemRenderEventArgs.cs
- SynchronizationLockException.cs
- WebBrowsableAttribute.cs
- FilteredDataSetHelper.cs
- IntMinMaxAggregationOperator.cs
- BufferedOutputStream.cs
- ListenerElementsCollection.cs
- LineMetrics.cs
- RegularExpressionValidator.cs
- HyperLink.cs
- XmlCustomFormatter.cs
- DataAdapter.cs
- PassportIdentity.cs
- TrustExchangeException.cs
- RootBrowserWindow.cs
- ImpersonateTokenRef.cs
- HtmlTableRowCollection.cs
- DataGridSortCommandEventArgs.cs
- InvokerUtil.cs
- ManagedWndProcTracker.cs
- SpecialNameAttribute.cs
- TextTreeUndo.cs
- UnsafeNativeMethods.cs
- NameValueConfigurationElement.cs
- SpellCheck.cs
- InvalidPrinterException.cs
- NamespaceEmitter.cs
- EastAsianLunisolarCalendar.cs
- ReaderContextStackData.cs
- TemplateComponentConnector.cs
- ConfigXmlWhitespace.cs
- WebPartEditorApplyVerb.cs
- PropertyIDSet.cs
- ZipPackage.cs
- SamlAssertion.cs
- XmlCompatibilityReader.cs
- RegistryExceptionHelper.cs
- Size3DConverter.cs
- ZeroOpNode.cs
- AllMembershipCondition.cs
- UrlMappingCollection.cs
- DbBuffer.cs
- QilIterator.cs
- CodeTypeParameterCollection.cs
- SiteIdentityPermission.cs
- StylusPlugInCollection.cs
- TypeHelper.cs
- SemanticKeyElement.cs
- ToolboxCategory.cs
- WorkflowServiceAttributes.cs
- DocumentPaginator.cs
- HostExecutionContextManager.cs
- SplitterCancelEvent.cs
- ListenerUnsafeNativeMethods.cs
- EndOfStreamException.cs
- TabletDeviceInfo.cs
- PrintPageEvent.cs
- GACMembershipCondition.cs
- UpdateTranslator.cs
- NotCondition.cs
- CodeGotoStatement.cs
- ComPlusThreadInitializer.cs
- ImageDesigner.cs
- BamlVersionHeader.cs
- EventLogPermissionHolder.cs
- GreenMethods.cs
- CatalogZoneBase.cs
- TemplateControlCodeDomTreeGenerator.cs
- WebPartZoneAutoFormat.cs
- SQLBytes.cs
- Pen.cs
- VisualBasicReference.cs
- HostedAspNetEnvironment.cs
- OracleMonthSpan.cs
- SID.cs