Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / VersionValidator.cs / 1305376 / VersionValidator.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.Configuration {
using System;
using System.Configuration;
internal sealed class VersionValidator : ConfigurationValidatorBase {
private readonly Version _minimumVersion;
public VersionValidator(Version minimumVersion) {
_minimumVersion = minimumVersion;
}
public override bool CanValidate(Type type) {
return typeof(Version).Equals(type);
}
public override void Validate(object value) {
if (value == null) {
throw new ArgumentNullException("value");
}
if (((Version)value) < _minimumVersion) {
throw new ArgumentOutOfRangeException("value",
SR.GetString(SR.Config_control_rendering_compatibility_version_is_less_than_minimum_version));
}
}
}
}
// 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
- ActivityDesignerHelper.cs
- ToolStripRenderer.cs
- HostSecurityManager.cs
- ServerValidateEventArgs.cs
- HttpWebRequest.cs
- XXXOnTypeBuilderInstantiation.cs
- ListViewItem.cs
- BackgroundFormatInfo.cs
- DocumentViewer.cs
- Empty.cs
- StrokeCollectionDefaultValueFactory.cs
- ExceptionHandlersDesigner.cs
- CodeExporter.cs
- WindowsFormsHostAutomationPeer.cs
- streamingZipPartStream.cs
- CaretElement.cs
- PolyBezierSegmentFigureLogic.cs
- TemplateBamlTreeBuilder.cs
- Visual3D.cs
- EnumType.cs
- ConfigXmlSignificantWhitespace.cs
- XmlTextReader.cs
- ManagementDateTime.cs
- COAUTHINFO.cs
- ClaimComparer.cs
- HtmlTable.cs
- GeneralTransform3DTo2DTo3D.cs
- ISFClipboardData.cs
- SqlNotificationEventArgs.cs
- ScalarRestriction.cs
- Predicate.cs
- RTLAwareMessageBox.cs
- HMACRIPEMD160.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- OptimalTextSource.cs
- CodeNamespaceCollection.cs
- NegotiationTokenProvider.cs
- MessageQueuePermissionEntryCollection.cs
- AssemblyBuilderData.cs
- TextRenderer.cs
- MenuItem.cs
- ListBoxItemWrapperAutomationPeer.cs
- Literal.cs
- Menu.cs
- WmiInstallComponent.cs
- SpellerStatusTable.cs
- ContextMenuAutomationPeer.cs
- UnsafeNativeMethodsMilCoreApi.cs
- SafeUserTokenHandle.cs
- IfJoinedCondition.cs
- DbParameterCollectionHelper.cs
- OrderedDictionaryStateHelper.cs
- SqlNodeAnnotation.cs
- ExtendedPropertyDescriptor.cs
- HtmlShim.cs
- TdsParserStateObject.cs
- ClockGroup.cs
- ConfigurationLockCollection.cs
- DataKeyArray.cs
- FontDialog.cs
- GenericUriParser.cs
- BoundField.cs
- ADMembershipUser.cs
- EdmItemCollection.OcAssemblyCache.cs
- KeyManager.cs
- TrackingLocationCollection.cs
- ProcessHostConfigUtils.cs
- TextFormatterImp.cs
- FormsAuthenticationEventArgs.cs
- PaperSource.cs
- ZipPackage.cs
- ClientSponsor.cs
- UpDownEvent.cs
- EntityCollection.cs
- XmlC14NWriter.cs
- ISessionStateStore.cs
- NativeMethods.cs
- LingerOption.cs
- NetworkStream.cs
- SrgsNameValueTag.cs
- WebPartConnectionsConnectVerb.cs
- KeyTime.cs
- GlobalEventManager.cs
- SendActivity.cs
- InvokeProviderWrapper.cs
- SerializationException.cs
- RichListBox.cs
- TraceHandler.cs
- HtmlInputCheckBox.cs
- TypeListConverter.cs
- RuleSetReference.cs
- ObjectConverter.cs
- ChunkedMemoryStream.cs
- Utils.cs
- WinFormsSpinner.cs
- Helpers.cs
- ImportCatalogPart.cs
- RangeValuePattern.cs
- SafeCoTaskMem.cs
- DataGridViewCellStyleChangedEventArgs.cs