예제 #1
0
        public bool CanAssignTo(IType type)
        {
            bool res = false;

            if (this == type)
            {
                return(true);
            }

            if (BaseType != null)
            {
                res = BaseType.CanAssignTo(type);

                if (res)
                {
                    return(true);
                }
            }

            if (Implements != null)
            {
                for (int i = 0; i < interfaces.Length; i++)
                {
                    var im = interfaces[i];
                    res = im.CanAssignTo(type);
                    if (res)
                    {
                        return(true);
                    }
                }
            }
            return(res);
        }
예제 #2
0
 public bool CanAssignTo(IType type)
 {
     return(BaseType.CanAssignTo(type));
 }