Example #1
0
 void ISerializationCallbackReceiver.OnAfterDeserialize()
 {
     // Attempt to preserve and restore the target type even if
     // it wasn't available during an assembly reload.
     if (targetType != null)
     {
         _targetTypeName = RuntimeCodebase.SerializeType(targetType);
     }
     else if (_targetTypeName != null)
     {
         try
         {
             targetType = RuntimeCodebase.DeserializeType(_targetTypeName);
         }
         catch { }
     }
 }
Example #2
0
 public static string SerializeType(Type type)
 {
     return(RuntimeCodebase.SerializeType(type));
 }