Ejemplo n.º 1
0
        /// <summary>
        /// Initializes static members.
        /// </summary>
        static DuckTyping()
        {
            s_DuckCasters = new List <IDuckCaster>();
            s_DuckCasters.Add(new InterfaceDuckCaster());
            s_DuckCasters.Add(new DelegateDuckCaster());
            s_DuckCasters.Add(new EnumStringDuckCaster());
            s_DuckCasters.Add(new GenericParameterDuckCaster());

            s_StaticDuckCasters = new List <IStaticDuckCaster>();
            s_StaticDuckCasters.Add(new InterfaceStaticDuckCaster());

            s_CanCastTree = new ToTypeFromTypeTree <bool>();

            s_CanStaticCastTree = new ToTypeFromTypeTree <bool>();
        }
 /// <summary>
 /// Initializes static members.
 /// </summary>
 static InterfaceStaticDuckCaster()
 {
     s_ProxyTypeTree = new ToTypeFromTypeTree <InterfaceDuckProxyType>();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes static members.
 /// </summary>
 static DelegateDuckCaster()
 {
     s_ProxyTypeTree = new ToTypeFromTypeTree <DelegateDuckProxyType>();
 }