/// <summary>
 ///     设置自定义的动态类型创建
 /// </summary>
 /// <exception cref="ArgumentNullException"></exception>
 private void InnerSetProvider(Func <Type, Type> dynamicTypeProvider)
 {
     if (dynamicTypeProvider == null)
     {
         throw new ArgumentNullException(nameof(dynamicTypeProvider));
     }
     _current = new DelegateDynamicTypeProvider(dynamicTypeProvider);
 }
 /// <summary>
 ///     设置IDynamicTypeProvider的实例
 /// </summary>
 /// <exception cref="ArgumentNullException"></exception>
 private void InnerSetProvider(IDynamicTypeProvider dynamicTypeProvider)
 {
     if (dynamicTypeProvider == null)
     {
         throw new ArgumentNullException(nameof(dynamicTypeProvider));
     }
     _current = dynamicTypeProvider;
 }
 /// <summary>
 ///     设置自定义的动态类型创建
 /// </summary>
 /// <exception cref="ArgumentNullException"></exception>
 private void InnerSetProvider(Func<Type, Type> dynamicTypeProvider)
 {
     if (dynamicTypeProvider == null)
     {
         throw new ArgumentNullException(nameof(dynamicTypeProvider));
     }
     _current = new DelegateDynamicTypeProvider(dynamicTypeProvider);
 }
 /// <summary>
 ///     设置IDynamicTypeProvider的实例
 /// </summary>
 /// <exception cref="ArgumentNullException"></exception>
 private void InnerSetProvider(IDynamicTypeProvider dynamicTypeProvider)
 {
     if (dynamicTypeProvider == null)
     {
         throw new ArgumentNullException(nameof(dynamicTypeProvider));
     }
     _current = dynamicTypeProvider;
 }
 /// <summary>
 ///     设置IDynamicTypeProvider的实例
 /// </summary>
 public static void SetProvider(IDynamicTypeProvider dynamicTypeProvider)
 {
     Instance.InnerSetProvider(dynamicTypeProvider);
 }
 /// <summary>
 ///     设置IDynamicTypeProvider的实例
 /// </summary>
 public static void SetProvider(IDynamicTypeProvider dynamicTypeProvider)
 {
     Instance.InnerSetProvider(dynamicTypeProvider);
 }