Beispiel #1
0
 EnableImplicitTypingFromNamespacePublic <T>(this IConfigurationContainer @this) =>
 @this.EnableImplicitTyping(new PublicTypesInSameNamespace <T>());
Beispiel #2
0
 public static IConfigurationContainer EnableImplicitTypingFromPublic <T>(this IConfigurationContainer @this) =>
 @this.EnableImplicitTyping(new PublicAssemblyTypes <T>());
Beispiel #3
0
 public static IConfigurationContainer EnableImplicitTypingFromNamespace <T>(this IConfigurationContainer @this) =>
 @this.EnableImplicitTyping(new AllTypesInSameNamespace <T>());
Beispiel #4
0
 public static IConfigurationContainer EnableImplicitTyping(this IConfigurationContainer @this,
                                                            params Type[] types)
 => @this.EnableImplicitTyping(types.AsEnumerable());
Beispiel #5
0
 public static IConfigurationContainer EnableImplicitTypingFromNested <T>(this IConfigurationContainer @this) =>
 @this.EnableImplicitTyping(new NestedTypes <T>());
Beispiel #6
0
 /// <summary>
 /// Convenience method to pass in a source type enumerable and resolve it into an array to pass to
 /// <see cref="EnableImplicitTyping(IConfigurationContainer,System.Type[])" />.  This is primarily used by the
 /// EnableImplicitTyping* methods, but can also be used with any enumerable of <see cref="System.Type"/>.
 /// </summary>
 /// <param name="this">The configuration container to configure.</param>
 /// <param name="types">The types to register as implicit.</param>
 /// <returns>The configured configuration container.</returns>
 /// <seealso cref="EnableImplicitTyping(IConfigurationContainer,System.Type[])"/>
 public static IConfigurationContainer EnableImplicitTyping(this IConfigurationContainer @this,
                                                            IEnumerable <Type> types)
 => @this.EnableImplicitTyping(types.ToArray());
Beispiel #7
0
 /// <summary>
 /// Convenience method to enable implicit typing on a container, using all nested types -- private or otherwise --
 /// found within the provided subject type.  All nested types found within the provided subject type will be
 /// included and registered as an implicit type.
 /// </summary>
 /// <param name="this">The configuration container to configure.</param>
 /// <param name="type">The subject type to query for type resolution.</param>
 /// <returns>The configured configuration container.</returns>
 /// <seealso cref="EnableImplicitTyping(IConfigurationContainer,System.Type[])"/>
 public static IConfigurationContainer EnableImplicitTypingFromNested(this IConfigurationContainer @this, Type type)
 => @this.EnableImplicitTyping(new NestedTypes(type));
Beispiel #8
0
 /// <summary>
 /// Convenience method to enable implicit typing on a container, using all recursively found public property types within the
 /// provided type. All public property types found within the provided type will be included and registered as an implicit type.
 /// Use this with care and ensure that the names of all the public types found within the namespace are unique.  Otherwise,
 /// an exception will be thrown if more than one type share the same name.
 /// </summary>
 /// <param name="this">The configuration container to configure.</param>
 /// <param name="type">The subject type to query for type resolution.</param>
 /// <returns>The configured configuration container.</returns>
 /// <seealso cref="EnableImplicitTyping(IConfigurationContainer,System.Type[])"/>
 public static IConfigurationContainer EnableImplicitTypingByInspecting(
     this IConfigurationContainer @this, Type type)
 => @this.EnableImplicitTyping(new InspectedPropertyTypes(type));
Beispiel #9
0
 /// <summary>
 /// Convenience method to enable implicit typing on a container, using all found public types within the provided
 /// subject type's namespace.  All public types found within the provided subject type's namespace will be included and
 /// registered as an implicit type.  Use this with care and ensure that the names of all the public types found within
 /// the namespace are unique.  Otherwise, an exception will be thrown if more than one type share the same name.
 /// </summary>
 /// <param name="this">The configuration container to configure.</param>
 /// <param name="type">The subject type to query for type resolution.</param>
 /// <returns>The configured configuration container.</returns>
 /// <seealso cref="EnableImplicitTyping(IConfigurationContainer,System.Type[])"/>
 public static IConfigurationContainer EnableImplicitTypingFromNamespacePublic(
     this IConfigurationContainer @this, Type type)
 => @this.EnableImplicitTyping(new PublicTypesInSameNamespace(type));
Beispiel #10
0
 /// <summary>
 /// Convenience method to enable implicit typing on a container, using all found public types within the provided
 /// subject type's assembly.  All public types found within the provided subject type's assembly will be included and
 /// registered as an implicit type.  Use this with care and ensure that the names of all the public types found within
 /// the assembly are unique.  Otherwise, an exception will be thrown if more than one type share the same name.
 /// </summary>
 /// <param name="this">The configuration container to configure.</param>
 /// <param name="type">The subject type to query for type resolution.</param>
 /// <returns>The configured configuration container.</returns>
 /// <seealso cref="EnableImplicitTyping(IConfigurationContainer,System.Type[])"/>
 public static IConfigurationContainer EnableImplicitTypingFromPublic(this IConfigurationContainer @this, Type type)
 => @this.EnableImplicitTyping(new PublicAssemblyTypes(type));