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 { } } }
public static string SerializeType(Type type) { return(RuntimeCodebase.SerializeType(type)); }