Пример #1
0
 /// <summary>
 /// Binds context to service
 /// </summary>
 /// <typeparam name="TService">Type of service</typeparam>
 /// <typeparam name="T1">Type of context variable #1</typeparam>
 /// <typeparam name="T2">Type of context variable #2</typeparam>
 /// <param name="db">Service builder</param>
 /// <param name="arg1">Context variable of type <typeparamref name="T1"></typeparamref> #1</param>
 /// <param name="arg2">Context variable of type <typeparamref name="T2"></typeparamref> #2</param>
 /// <returns>Service instance</returns>
 public static TService Within <TService, T1, T2>(this LetBuilder <TService> db, T1 arg1, T2 arg2)
     where TService : TectureServiceBase, IContext <T1, T2>
 {
     return(db.Init(
                new[] { typeof(T1), typeof(T2) }
                , new object[] { arg1, arg2 }));
 }
Пример #2
0
 /// <summary>
 /// Binds context to service
 /// </summary>
 /// <typeparam name="TService">Type of service</typeparam>
 /// <typeparam name="T1">Type of context variable #1</typeparam>
 /// <typeparam name="T2">Type of context variable #2</typeparam>
 /// <typeparam name="T3">Type of context variable #3</typeparam>
 /// <typeparam name="T4">Type of context variable #4</typeparam>
 /// <param name="db">Service builder</param>
 /// <param name="arg1">Context variable of type <typeparamref name="T1"></typeparamref> #1</param>
 /// <param name="arg2">Context variable of type <typeparamref name="T2"></typeparamref> #2</param>
 /// <param name="arg3">Context variable of type <typeparamref name="T3"></typeparamref> #3</param>
 /// <param name="arg4">Context variable of type <typeparamref name="T4"></typeparamref> #4</param>
 /// <returns>Service instance</returns>
 public static TService Within <TService, T1, T2, T3, T4>(this LetBuilder <TService> db, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
     where TService : TectureServiceBase, IContext <T1, T2, T3, T4>
 {
     return(db.Init(
                new[] { typeof(T1), typeof(T2), typeof(T3), typeof(T4) }
                , new object[] { arg1, arg2, arg3, arg4 }));
 }
Пример #3
0
 /// <summary>
 /// Binds context to service
 /// </summary>
 /// <typeparam name="TService">Type of service</typeparam>
 /// <typeparam name="T1">Type of context variable #1</typeparam>
 /// <typeparam name="T2">Type of context variable #2</typeparam>
 /// <typeparam name="T3">Type of context variable #3</typeparam>
 /// <typeparam name="T4">Type of context variable #4</typeparam>
 /// <typeparam name="T5">Type of context variable #5</typeparam>
 /// <typeparam name="T6">Type of context variable #6</typeparam>
 /// <typeparam name="T7">Type of context variable #7</typeparam>
 /// <typeparam name="T8">Type of context variable #8</typeparam>
 /// <param name="db">Service builder</param>
 /// <param name="arg1">Context variable of type <typeparamref name="T1"></typeparamref> #1</param>
 /// <param name="arg2">Context variable of type <typeparamref name="T2"></typeparamref> #2</param>
 /// <param name="arg3">Context variable of type <typeparamref name="T3"></typeparamref> #3</param>
 /// <param name="arg4">Context variable of type <typeparamref name="T4"></typeparamref> #4</param>
 /// <param name="arg5">Context variable of type <typeparamref name="T5"></typeparamref> #5</param>
 /// <param name="arg6">Context variable of type <typeparamref name="T6"></typeparamref> #6</param>
 /// <param name="arg7">Context variable of type <typeparamref name="T7"></typeparamref> #7</param>
 /// <param name="arg8">Context variable of type <typeparamref name="T8"></typeparamref> #8</param>
 /// <returns>Service instance</returns>
 public static TService Within <TService, T1, T2, T3, T4, T5, T6, T7, T8>(this LetBuilder <TService> db, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8)
     where TService : TectureServiceBase, IContext <T1, T2, T3, T4, T5, T6, T7, T8>
 {
     return(db.Init(
                new[] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8) }
                , new object[] { arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 }));
 }