Пример #1
0
 /// <summary>
 /// Adds mapping with <typeparamref name="TBehaviorContract"/> as contract and <typeparamref name="TBehaviorImplementation"/> as implementation type.
 /// </summary>
 /// <typeparam name="TBehaviorContract">Behavior interface contract.</typeparam>
 /// <typeparam name="TBehaviorImplementation">Behavior contract implementor.</typeparam>
 /// <returns>Self (for fluency).</returns>>
 public static InterfaceBehaviorCollection Insert <TBehaviorContract, TBehaviorImplementation>(this InterfaceBehaviorCollection provider, int index)
     where TBehaviorImplementation : IBehavior <TBehaviorContract>
 {
     Ensure.NotNull(provider, "provider");
     return(provider.Insert(index, typeof(TBehaviorContract), typeof(TBehaviorImplementation)));
 }
Пример #2
0
 /// <summary>
 /// Adds mapping with <typeparamref name="TBehaviorContract"/> as contract and <typeparamref name="TBehaviorImplementation"/> as implementation type.
 /// </summary>
 /// <typeparam name="TBehaviorContract">Behavior interface contract.</typeparam>
 /// <typeparam name="TBehaviorImplementation">Behavior contract implementor.</typeparam>
 /// <returns>Self (for fluency).</returns>>
 public static InterfaceBehaviorCollection Add <TBehaviorContract, TBehaviorImplementation>(this InterfaceBehaviorCollection provider)
     where TBehaviorImplementation : IBehavior <TBehaviorContract>
 {
     Ensure.NotNull(provider, "provider");
     return(provider.Add(typeof(TBehaviorContract), typeof(TBehaviorImplementation)));
 }