Example #1
0
 public void SetType(Type type)
 {
     if (type == null)
     {
         throw new ArgumentNullException("type");
     }
     if (this.requireSameTokenInPartialTrust)
     {
         SerializationInfo.DemandForUnsafeAssemblyNameAssignments(this.ObjectType.Assembly.FullName, type.Assembly.FullName);
     }
     if (this.objectType == type)
     {
         return;
     }
     this.objectType                = type;
     this.m_fullTypeName            = type.FullName;
     this.m_assemName               = type.Module.Assembly.FullName;
     this.isFullTypeNameSetExplicit = false;
     this.isAssemblyNameSetExplicit = false;
 }