SmartDIExtensions.cs
/// <summary>
/// The same as <see cref="RegisterType" />, except with a more Generic way to state the base class type.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="diContainer">The di container.</param>
/// <param name="storageRule">The storage rule.</param>
/// <param name="creator">The creator.</param>
/// <param name="addMainTypeAsDefault">if set to <c>true</c> [add main type as default].</param>
/// <param name="typesToCastAs">The types to cast as.</param>
The same as , except with a more Generic way to state the base class type.
The same as except with a more Generic way to state the base class type .
public static void RegisterType<T>
      (
         this ISmartDIContainer diContainer,
         StorageRules           storageRule          = StorageRules.AnyAccessLevel,
         Func<object>           creator              = null,
         bool                   addMainTypeAsDefault = false,
         params Type[]          typesToCastAs
      )
         where T : class
      {
         diContainer.RegisterType(typeof(T), storageRule, creator, addMainTypeAsDefault, typesToCastAs);
      }
public static void RegisterType < T > ( this ISmartDIContainer diContainer , StorageRules storageRule = StorageRules . AnyAccessLevel , Func < object > creator = null , bool addMainTypeAsDefault = false , params Type [ ] typesToCastAs ) where T : class { diContainer . RegisterType ( typeof ( T ) , storageRule , creator , addMainTypeAsDefault , typesToCastAs ) ; }
The same as , except with a more Generic way to state the base class type.
The same as except with a more Generic way to state the base class type .
ISmartDIContainer
this
storageRule
StorageRules
The storage rule.
The storage rule .
creator
Func<object>
None
addMainTypeAsDefault
bool
if set to true
if set to true
diContainer
The di container.
The di container .
typesToCastAs
The types to cast as.
The types to cast as .
typeparam
None