/// <summary> /// 指定绑定动态实现的类型,初始化 Sofire.Dynamic.Dynamic<I> 类的新实例。 /// </summary> /// <param name="instanceType">实例类型。</param> public Dynamic(Type instanceType) { if (instanceType == null) { throw new ArgumentNullException("instanceType"); } this._Fields = new DynamicFieldHelper <I>(instanceType); this._Methods = new DynamicMethodHelper <I>(instanceType); this._Properties = new DynamicPropertyHelper <I>(instanceType); }
/// <summary> /// 指定绑定动态实现的实例,初始化 Sofire.Dynamic.Dynamic<I> 类的新实例。 /// </summary> /// <param name="instance">实例。可以为 null,表示动态实现 I 的静态字段。</param> public Dynamic(I instance) { this._Fields = new DynamicFieldHelper <I>(instance); this._Methods = new DynamicMethodHelper <I>(instance); this._Properties = new DynamicPropertyHelper <I>(instance); }