Ejemplo n.º 1
0
        void InitCast(MethodInfo method)
        {
            var castAttr = method.GetCustomAttribute <DtoCastAttribute>();

            if (castAttr == null)
            {
                return;
            }

            var error = DtoCopierCastStorage.CheckMethod(method);

            if (error != null)
            {
                throw InvalidSignatureExceptionFactory.Create(method);
            }

            Casts.Append(method, castAttr.AvailableTypes);
        }
Ejemplo n.º 2
0
 public DtoCopier(DtoCopierCastStorage casts) : this()
 {
     m_casts = casts;
 }