Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / StandardRuntimeEnumValidator.cs / 1 / StandardRuntimeEnumValidator.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Configuration { using System; using System.ComponentModel; using System.Configuration; internal class StandardRuntimeEnumValidator : ConfigurationValidatorBase { Type enumType; public StandardRuntimeEnumValidator(Type enumType) { this.enumType = enumType; } public override bool CanValidate(Type type) { return (type.IsEnum); } public override void Validate(object value) { if (!Enum.IsDefined(enumType, value)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidEnumArgumentException("value", (int)value, enumType)); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HyperLinkField.cs
- BinaryObjectInfo.cs
- Geometry3D.cs
- MessageBodyDescription.cs
- Profiler.cs
- QueryReaderSettings.cs
- _SslStream.cs
- DispatcherObject.cs
- CompositionCommandSet.cs
- validation.cs
- MenuEventArgs.cs
- RegexWorker.cs
- CustomError.cs
- VirtualDirectoryMapping.cs
- FileDialog_Vista.cs
- SecurityState.cs
- DataServiceHostFactory.cs
- InputLangChangeEvent.cs
- EditingMode.cs
- ComponentChangingEvent.cs
- PolicyFactory.cs
- UseLicense.cs
- ToolStripCollectionEditor.cs
- X509ChainElement.cs
- ExtenderProviderService.cs
- WebBrowserPermission.cs
- CachedFontFace.cs
- DynamicActionMessageFilter.cs
- BindUriHelper.cs
- ChannelCacheDefaults.cs
- EntityClassGenerator.cs
- InvalidComObjectException.cs
- Attribute.cs
- XmlDocumentFragment.cs
- MiniParameterInfo.cs
- DictionaryEntry.cs
- Point.cs
- ApplicationServiceHelper.cs
- ModelTreeEnumerator.cs
- SqlServices.cs
- DateTimeFormatInfoScanner.cs
- ScriptReference.cs
- DataGridRow.cs
- ByteStack.cs
- ArraySegment.cs
- ThreadPool.cs
- EdmProperty.cs
- MemberPathMap.cs
- Stream.cs
- XPathNodeHelper.cs
- ProviderConnectionPoint.cs
- DropDownButton.cs
- CounterCreationDataCollection.cs
- AssociationType.cs
- DirectoryObjectSecurity.cs
- ExtendedPropertyCollection.cs
- ListItemConverter.cs
- ClosableStream.cs
- MatcherBuilder.cs
- RadialGradientBrush.cs
- WorkflowApplicationCompletedEventArgs.cs
- XappLauncher.cs
- SoapElementAttribute.cs
- Pool.cs
- SecurityManager.cs
- DynamicEndpointElement.cs
- InputBinder.cs
- Vector3DCollection.cs
- HandlerMappingMemo.cs
- SimpleHandlerFactory.cs
- RelatedCurrencyManager.cs
- Attributes.cs
- XmlAttributeOverrides.cs
- StoreItemCollection.cs
- Convert.cs
- WindowsAuthenticationModule.cs
- XDeferredAxisSource.cs
- ClockGroup.cs
- ActiveXHelper.cs
- ZipIOCentralDirectoryFileHeader.cs
- ExpressionParser.cs
- PropertyDescriptorComparer.cs
- GroupStyle.cs
- DiscriminatorMap.cs
- ServiceDiscoveryElement.cs
- ButtonFieldBase.cs
- DrawTreeNodeEventArgs.cs
- _BasicClient.cs
- WorkingDirectoryEditor.cs
- ListBox.cs
- RequestCache.cs
- CardSpacePolicyElement.cs
- EntityModelSchemaGenerator.cs
- MethodSet.cs
- Vector3DAnimation.cs
- ImageSource.cs
- PackageRelationshipSelector.cs
- SecurityKeyIdentifierClause.cs
- SqlDataAdapter.cs
- SerialErrors.cs