コード例 #1
0
 /// <summary>
 /// Indicates that a service should be bound to the first available implementation.
 /// </summary>
 /// <typeparam name="TService">The implementation type.</typeparam>
 /// <typeparam name="T1">The first implementation type to try.</typeparam>
 /// <typeparam name="T2">The second implementation type to try.</typeparam>
 /// <typeparam name="T3">The third implementation type to try.</typeparam>
 /// <param name="syntax">The fluent syntax.</param>
 /// <returns>The fluent syntax.</returns>
 public static object ToFirst <TService, T1, T2, T3>(this IBindingToSyntax <TService> syntax)
     where T1 : TService
     where T2 : TService
     where T3 : TService
 {
     return(syntax.ToFirst(typeof(T1), typeof(T2), typeof(T3)));
 }
コード例 #2
0
 /// <summary>
 /// Indicates that a service should be bound to the first available implementation.
 /// </summary>
 /// <typeparam name="TService">The implementation type.</typeparam>
 /// <typeparam name="T1">The only implementation type to try.</typeparam>
 /// <param name="syntax">The fluent syntax.</param>
 /// <returns>The fluent syntax.</returns>
 public static object ToFirst <TService, T1>(this IBindingToSyntax <TService> syntax)
     where T1 : TService
 {
     return(syntax.ToFirst(typeof(T1)));
 }