Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / Serialization / System / Runtime / Serialization / Configuration / DeclaredTypeValidator.cs / 1305376 / DeclaredTypeValidator.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.Runtime.Serialization.Configuration { using System; using System.Configuration; using System.Runtime.Serialization; internal class DeclaredTypeValidator : ConfigurationValidatorBase { public override bool CanValidate(Type type) { return (typeof(string) == type); } public override void Validate(object value) { string type = (string)value; if (type.StartsWith(Globals.TypeOfObject.FullName, StringComparison.Ordinal)) { Type t = Type.GetType(type, false); if (t != null && Globals.TypeOfObject.Equals(t)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument(SR.GetString(SR.KnownTypeConfigObject)); } } } } } // 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
- AmbientLight.cs
- ExpressionBuilder.cs
- XmlSchemaCompilationSettings.cs
- MetadataArtifactLoaderResource.cs
- ManagedFilter.cs
- ConfigUtil.cs
- SqlDataSourceStatusEventArgs.cs
- ListViewDeletedEventArgs.cs
- Int32Rect.cs
- ReflectTypeDescriptionProvider.cs
- ManagementClass.cs
- AssemblyName.cs
- InfiniteIntConverter.cs
- XmlAtomicValue.cs
- DesignerCalendarAdapter.cs
- XmlStringTable.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- SoapSchemaImporter.cs
- Rights.cs
- UIInitializationException.cs
- AssemblySettingAttributes.cs
- SqlClientWrapperSmiStream.cs
- MeasureItemEvent.cs
- ViewBox.cs
- SafeEventLogWriteHandle.cs
- RectAnimationBase.cs
- TextTreeRootNode.cs
- TextContainerHelper.cs
- AvTrace.cs
- ToolStripPanelRow.cs
- MenuRenderer.cs
- UntrustedRecipientException.cs
- UnsafeNativeMethods.cs
- TextProperties.cs
- SafeProcessHandle.cs
- ProjectionCamera.cs
- Process.cs
- OutKeywords.cs
- Variant.cs
- IPHostEntry.cs
- ConsoleEntryPoint.cs
- ChildrenQuery.cs
- TextContainerHelper.cs
- graph.cs
- WhileDesigner.cs
- SchemaMerger.cs
- PenLineCapValidation.cs
- BasicCommandTreeVisitor.cs
- ToolStripDropDownItem.cs
- WebPartAuthorizationEventArgs.cs
- FtpWebRequest.cs
- TagPrefixAttribute.cs
- Tracking.cs
- IxmlLineInfo.cs
- DictationGrammar.cs
- ApplicationBuildProvider.cs
- Popup.cs
- X509UI.cs
- SelectionProcessor.cs
- MethodSet.cs
- SplitContainer.cs
- Error.cs
- XmlCollation.cs
- DirectoryRootQuery.cs
- StatusBarItemAutomationPeer.cs
- SQLResource.cs
- DynamicResourceExtensionConverter.cs
- RenderTargetBitmap.cs
- CorrelationResolver.cs
- MobileTemplatedControlDesigner.cs
- SetterBase.cs
- AttachInfo.cs
- GridViewRow.cs
- HtmlLabelAdapter.cs
- HttpCachePolicy.cs
- TableItemPattern.cs
- AnnotationService.cs
- SqlProviderManifest.cs
- SmtpException.cs
- XmlIgnoreAttribute.cs
- GridViewColumnCollectionChangedEventArgs.cs
- BindingEntityInfo.cs
- XamlVector3DCollectionSerializer.cs
- DataSvcMapFileSerializer.cs
- SendKeys.cs
- AlphabeticalEnumConverter.cs
- StylusPoint.cs
- DesignerImageAdapter.cs
- BuildProviderCollection.cs
- WorkflowPrinting.cs
- StorageMappingFragment.cs
- RegexInterpreter.cs
- PropertyTabChangedEvent.cs
- XmlSchemas.cs
- Int32Storage.cs
- OracleString.cs
- MethodExpr.cs
- FormViewPagerRow.cs
- SByteStorage.cs
- DefaultValueMapping.cs