Beispiel #1
0
        public virtual Type LocateByRefType(Type refType)
        {
            if (!Resolve(refType, out string _className, out string _namespace))
            {
                return(null);
            }

            var name = _namespace + '.' + _className;
            var type = Type.GetType(name);

            if (type == null)
            {
                type = refType.Assembly().GetType(name);
            }
            if (type == null)
            {
                type = TargetType.Assembly().GetType(name);
            }
            return(type);
        }