IdeaBlade DevForce 2010 Help Reference
TypeWrapper Class
Members  See Also  Send Feedback
IdeaBlade.Core Assembly > IdeaBlade.Core Namespace : TypeWrapper Class



Wrapper used with the System.Runtime.Serialization.DataContractSerializer to allow System.Type data members to be transmitted across tiers.

Syntax

Visual Basic (Declaration) 
<DataContractAttribute()>
Public Class TypeWrapper 
Visual Basic (Usage)Copy Code
Dim instance As TypeWrapper
C# 
[DataContractAttribute()]
public class TypeWrapper 
C++/CLI 
[DataContractAttribute()]
public ref class TypeWrapper 

Remarks

The TypeWrapper is used internally by the framework whenever a serializable data member of System.Type is needed. You can use the TypeWrapper in your own code if you also need to send a System.Type member between tiers. For instance if a remote service method should accept a System.Type argument you should instead use a TypeWrapper to ensure the argument can be transmitted between tiers.

The TypeWrapper also supplies automatic type "mapping" between Silverlight and .NET. This allows the assembly-qualified type names to differ between the different environments: for example the type name of an Entity is "IdeaBlade.EntityModel.Entity, IdeaBlade.EntityModel" in .NET, while it's "IdeaBlade.EntityModel.Entity, IdeaBlade.EntityModel.SL" in Silverlight. This mapping applies to standard .NET types too, entities in your models, and to other custom types transmitted across tiers. For the entities in your model, type mapping allows you to place your "Customer" entity, for example, in assemblies having different names on client and server, e.g., "MyModel.Customer, DomainModel.SL" vs. "MyModel.Customer, MyWebApp". If the type cannot be resolved an explanatory exception will be thrown.

Inheritance Hierarchy

System.Object
   IdeaBlade.Core.TypeWrapper

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.