DevForce Help Reference
TypeWrapper Class
Members 


Wrapper used with the System.Runtime.Serialization.DataContractSerializer to allow System.Type data members to be transmitted across tiers.
Syntax
'Declaration
 
<DataContractAttribute()>
Public Class TypeWrapper 
'Usage
 
Dim instance As TypeWrapper
[DataContract()]
public 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 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

TypeWrapper Members
IdeaBlade.Core Namespace

Send Feedback