System.Reflection.MemberInfoSerializationHolder.GetSerializationInfo C# (CSharp) Method

GetSerializationInfo() public static method

public static GetSerializationInfo ( SerializationInfo info, String name, Type reflectedClass, String signature, MemberTypes type, Type genericArguments ) : void
info System.Runtime.Serialization.SerializationInfo
name String
reflectedClass System.Type
signature String
type MemberTypes
genericArguments System.Type
return void
        public static void GetSerializationInfo(
            SerializationInfo info, String name, Type reflectedClass, String signature, MemberTypes type, Type[] genericArguments)
        {
            if (info == null)
                throw new ArgumentNullException("info");

            String assemblyName = reflectedClass.Module.Assembly.FullName;
            String typeName = reflectedClass.FullName;

            info.SetType(typeof(MemberInfoSerializationHolder));
            info.AddValue("Name", name, typeof(String));
            info.AddValue("AssemblyName", assemblyName, typeof(String));
            info.AddValue("ClassName", typeName, typeof(String));
            info.AddValue("Signature", signature, typeof(String));
            info.AddValue("MemberType", (int)type);
            info.AddValue("GenericArguments", genericArguments, typeof(Type[]));
        }
        #endregion

Same methods

MemberInfoSerializationHolder::GetSerializationInfo ( SerializationInfo info, String name, Type reflectedClass, String signature, MemberTypes type ) : void

Usage Example

Esempio n. 1
0
 public void GetObjectData(SerializationInfo info, StreamingContext context)
 {
     if (info == null)
     {
         throw new ArgumentNullException("info");
     }
     MemberInfoSerializationHolder.GetSerializationInfo(info, this.Name, this.ReflectedTypeInternal, this.ToString(), this.SerializationToString(), MemberTypes.Property, (Type[])null);
 }
All Usage Examples Of System.Reflection.MemberInfoSerializationHolder::GetSerializationInfo