public static IReflector Bind(object obj, IReflectPolicy policy) { obj.ThrowIfNullArgument(nameof(obj)); Reflector r = new Reflector(); if (policy.BindInstance) { r._instance = obj; r._type = obj.GetType(); } else { r._type = obj as Type; if (r._type == null) ThrowHelper.ThrowInvalidType("obj"); } r._policy = policy; return r; }
public static IReflector Bind(object obj) { return(Reflector.Bind(obj, ReflectorPolicy.InstancePublic)); }