Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Configuration / System / Configuration / LongValidatorAttribute.cs / 1305376 / LongValidatorAttribute.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 LongValidatorAttribute : ConfigurationValidatorAttribute { private long _min = long.MinValue; private long _max = long.MaxValue; private bool _excludeRange = false; public override ConfigurationValidatorBase ValidatorInstance { get { return new LongValidator(_min, _max, _excludeRange); } } public LongValidatorAttribute() { } public long MinValue { get { return _min; } set { if (_max < value) { throw new ArgumentOutOfRangeException("value", SR.GetString(SR.Validator_min_greater_than_max)); } _min = value; } } public long 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
- FontWeights.cs
- DataKeyArray.cs
- TypeConverterHelper.cs
- QilSortKey.cs
- ObjectComplexPropertyMapping.cs
- NameSpaceEvent.cs
- WebPartMinimizeVerb.cs
- ObjectDataSourceSelectingEventArgs.cs
- DelegateHelpers.cs
- OperationInfo.cs
- CodeThrowExceptionStatement.cs
- DataContext.cs
- TypefaceMetricsCache.cs
- RedirectionProxy.cs
- MimeTypePropertyAttribute.cs
- CalendarDataBindingHandler.cs
- CodeGroup.cs
- SQLBinary.cs
- OverrideMode.cs
- ServerType.cs
- XmlMessageFormatter.cs
- Hash.cs
- VirtualizedItemProviderWrapper.cs
- ComponentResourceManager.cs
- InitializerFacet.cs
- ScriptControlManager.cs
- NetworkStream.cs
- NavigationExpr.cs
- ViewLoader.cs
- sqlcontext.cs
- UnsafeNativeMethods.cs
- SectionInput.cs
- XmlTextReaderImplHelpers.cs
- WebPartEditorApplyVerb.cs
- Renderer.cs
- TextPatternIdentifiers.cs
- DataContractAttribute.cs
- TransactionOptions.cs
- ListItem.cs
- Site.cs
- SqlFunctions.cs
- PopupRootAutomationPeer.cs
- ImageAttributes.cs
- JoinGraph.cs
- XmlElementAttributes.cs
- HttpHandlersSection.cs
- PagedDataSource.cs
- SafeHandles.cs
- PropertyChangedEventArgs.cs
- StatusBarItemAutomationPeer.cs
- SqlDataSourceSelectingEventArgs.cs
- OleServicesContext.cs
- DeclaredTypeValidator.cs
- HelpProvider.cs
- PageHandlerFactory.cs
- UInt16Converter.cs
- RightsManagementInformation.cs
- WebPartConnectionsConnectVerb.cs
- TabControlCancelEvent.cs
- RequestTimeoutManager.cs
- ServicePrincipalNameElement.cs
- DomainConstraint.cs
- WindowsIdentity.cs
- MailDefinition.cs
- VisualTarget.cs
- DetailsView.cs
- ProtocolsSection.cs
- FloaterParaClient.cs
- AssemblyCache.cs
- RegexTypeEditor.cs
- BuildProviderUtils.cs
- CollectionView.cs
- PrimitiveType.cs
- ComplexType.cs
- MessageDescription.cs
- QueryCacheEntry.cs
- FolderLevelBuildProviderCollection.cs
- PropertyInfoSet.cs
- HttpRawResponse.cs
- CustomExpressionEventArgs.cs
- LinqDataSourceValidationException.cs
- Enlistment.cs
- ListBindingConverter.cs
- PasswordTextNavigator.cs
- XamlVector3DCollectionSerializer.cs
- CqlLexer.cs
- AttributeTable.cs
- ItemCollection.cs
- UnsafeNativeMethods.cs
- CFGGrammar.cs
- CompoundFileIOPermission.cs
- SymmetricAlgorithm.cs
- DataObjectAttribute.cs
- SubMenuStyleCollection.cs
- DocumentSequenceHighlightLayer.cs
- NotifyParentPropertyAttribute.cs
- Message.cs
- DesigntimeLicenseContextSerializer.cs
- QueryContinueDragEvent.cs
- ApplicationManager.cs