Ejemplo n.º 1
0
 /// <summary>
 ///   Maps an old type to a new type during serialization.
 /// </summary>
 /// <param name="assemblyName">The assembly name of the old type.</param>
 /// <param name="typeName">The name of the old type.</param>
 /// <param name="newType">The new type.</param>
 /// <exception cref="OverflowException">
 ///   The type map contains the <see cref="int.MaxValue">maximum</see> number of elements.
 /// </exception>
 /// <seealso cref="System.Reflection.Assembly"/>
 /// <seealso cref="System.Reflection.AssemblyName"/>
 public static void MapType([NotNull] string assemblyName, [NotNull] string typeName, [NotNull] Type newType)
 {
     ExtendedSerializationBinder.MapType(assemblyName, typeName, newType);
 }
Ejemplo n.º 2
0
 /// <summary>
 ///   Maps an old type to a new type during serialization.
 /// </summary>
 /// <typeparam name="TNew">The new type.</typeparam>
 /// <param name="assemblyName">The name of the assembly.</param>
 /// <param name="typeName">The name of the type.</param>
 /// <exception cref="OverflowException">
 ///   The type map contains the <see cref="int.MaxValue">maximum</see> number of elements.
 /// </exception>
 /// <seealso cref="System.Reflection.Assembly"/>
 /// <seealso cref="System.Reflection.AssemblyName"/>
 public static void MapType <TNew>([NotNull] string assemblyName, [NotNull] string typeName)
 {
     ExtendedSerializationBinder.MapType(assemblyName, typeName, typeof(TNew));
 }