ImpromptuInterface/src/EmitProxy/ActLikeProxy.cs
/// <summary>
/// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"/> with the data needed to serialize the target object.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> to populate with data.</param>
/// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"/>) for this serialization.</param>
/// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
Populates a  with the data needed to serialize the target object.
Populates a with the data needed to serialize the target object .
public void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            info.SetType(typeof(ActLikeProxySerializationHelper));
		    var tCustomAttr =
                GetType().GetCustomAttributes(typeof (ActLikeProxyAttribute), false).OfType<ActLikeProxyAttribute>().
                    FirstOrDefault();
            info.AddValue("Context",
                          tCustomAttr == null 
                          ? null
                          : tCustomAttr.Context,typeof(Type));
			if(Util.IsMono){
				info.AddValue("MonoInterfaces",
                          tCustomAttr == null 
                          ? null
                          : tCustomAttr.Interfaces.Select(it=>it.AssemblyQualifiedName).ToArray(),typeof(string[]));
			}else{
            	info.AddValue("Interfaces",
                          tCustomAttr == null 
                          ? null
                          : tCustomAttr.Interfaces,typeof(Type[]));
			}
            info.AddValue("Original", (object)ActLikeProxyOriginal);
        }
public void GetObjectData ( SerializationInfo info , StreamingContext context ) { info . SetType ( typeof ( ActLikeProxySerializationHelper ) ) ; var tCustomAttr = GetType ( ) . GetCustomAttributes ( typeof ( ActLikeProxyAttribute ) , false ) . OfType < ActLikeProxyAttribute > ( ) . FirstOrDefault ( ) ; info . AddValue ( " " , tCustomAttr == null ? null : tCustomAttr . Context , typeof ( Type ) ) ; if ( Util . IsMono ) { info . AddValue ( " " , tCustomAttr == null ? null : tCustomAttr . Interfaces . Select ( it => it . AssemblyQualifiedName ) . ToArray ( ) , typeof ( string [ ] ) ) ; } else { info . AddValue ( " " , tCustomAttr == null ? null : tCustomAttr . Interfaces , typeof ( Type [ ] ) ) ; } info . AddValue ( " " , ( object ) ActLikeProxyOriginal ) ; }
Populates a  with the data needed to serialize the target object.
Populates a with the data needed to serialize the target object .
The caller does not have the required permission.
The caller does not have the required permission .
info
SerializationInfo
The  to populate with data.
The to populate with data .
context
StreamingContext
The destination  for this serialization.
The destination for this serialization .