Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / xsp / System / Web / Extensions / Script / Serialization / SimpleTypeResolver.cs / 1 / SimpleTypeResolver.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.Script.Serialization {
using System;
using System.Security.Permissions;
using System.Web;
[
AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal),
AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal),
]
public class SimpleTypeResolver : JavaScriptTypeResolver {
public override Type ResolveType(string id) {
return Type.GetType(id);
}
public override string ResolveTypeId(Type type) {
if (type == null) {
throw new ArgumentNullException("type");
}
return type.AssemblyQualifiedName;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.Script.Serialization {
using System;
using System.Security.Permissions;
using System.Web;
[
AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal),
AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal),
]
public class SimpleTypeResolver : JavaScriptTypeResolver {
public override Type ResolveType(string id) {
return Type.GetType(id);
}
public override string ResolveTypeId(Type type) {
if (type == null) {
throw new ArgumentNullException("type");
}
return type.AssemblyQualifiedName;
}
}
}
// 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
- ObjectDataSourceView.cs
- CurrentChangedEventManager.cs
- Misc.cs
- SoapHeaders.cs
- DesignTimeTemplateParser.cs
- DecoderFallback.cs
- SpanIndex.cs
- Light.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- SchemaContext.cs
- ConditionedDesigner.cs
- CacheSection.cs
- XPathNavigatorKeyComparer.cs
- SchemaComplexType.cs
- Lasso.cs
- SemaphoreFullException.cs
- EventLogPropertySelector.cs
- BaseDataList.cs
- ValueQuery.cs
- BevelBitmapEffect.cs
- DispatcherFrame.cs
- PropertyGridEditorPart.cs
- Model3DGroup.cs
- SystemColorTracker.cs
- SlotInfo.cs
- CalculatedColumn.cs
- ToolboxItem.cs
- ClientRolePrincipal.cs
- SequenceFullException.cs
- MaterialCollection.cs
- CommandSet.cs
- VectorAnimation.cs
- ListDictionary.cs
- Relationship.cs
- CfgParser.cs
- StylusSystemGestureEventArgs.cs
- parserscommon.cs
- CodeVariableReferenceExpression.cs
- DocumentViewerBase.cs
- RSAPKCS1SignatureFormatter.cs
- QilInvokeLateBound.cs
- XmlValueConverter.cs
- SapiAttributeParser.cs
- ComboBoxAutomationPeer.cs
- MappingSource.cs
- ResourceDictionaryCollection.cs
- BrowserCapabilitiesCodeGenerator.cs
- MarkedHighlightComponent.cs
- XmlSchemaObjectCollection.cs
- ComAwareEventInfo.cs
- GetPageCompletedEventArgs.cs
- AuthenticationSection.cs
- ThicknessAnimationBase.cs
- Ops.cs
- __Filters.cs
- RegexRunnerFactory.cs
- BevelBitmapEffect.cs
- MouseEvent.cs
- Helper.cs
- BoundsDrawingContextWalker.cs
- xml.cs
- ValidationPropertyAttribute.cs
- XmlReflectionImporter.cs
- WmfPlaceableFileHeader.cs
- DataException.cs
- ScriptResourceDefinition.cs
- ellipse.cs
- SqlBooleanMismatchVisitor.cs
- ObjectConverter.cs
- Viewport2DVisual3D.cs
- ButtonColumn.cs
- XmlNodeChangedEventArgs.cs
- SafeRightsManagementPubHandle.cs
- FixedDocument.cs
- CodeStatement.cs
- ProcessProtocolHandler.cs
- SettingsPropertyWrongTypeException.cs
- CircleEase.cs
- WebHeaderCollection.cs
- DeleteMemberBinder.cs
- AmbientLight.cs
- ArcSegment.cs
- WhereQueryOperator.cs
- OracleCommandBuilder.cs
- ServiceInstanceProvider.cs
- HandoffBehavior.cs
- SchemaInfo.cs
- XmlProcessingInstruction.cs
- PeerNode.cs
- WindowsGraphics2.cs
- X509Chain.cs
- DynamicResourceExtensionConverter.cs
- SqlProviderUtilities.cs
- ScriptingProfileServiceSection.cs
- TypeInitializationException.cs
- OrderedDictionary.cs
- ObjectListItemCollection.cs
- SigningProgress.cs
- ObjectDataSourceWizardForm.cs
- HttpListenerResponse.cs