Exemple #1
0
 public static void Register <T>(
     this IDiRegisterOnlyContainer self, LifeStyle?style = null) where T : class =>
 self.RegisterAlias(typeof(T), typeof(T), style);
Exemple #2
0
 public static void Register(IDiRegisterOnlyContainer container)
 {
     container.RegisterAlias <Philadelphia.Demo.SharedModel.ISomeService, WebClientSomeService>(Philadelphia.Common.LifeStyle.Singleton);
     container.RegisterAlias <Philadelphia.Demo.SharedModel.ITranslationsService, WebClientTranslationsService>(Philadelphia.Common.LifeStyle.Singleton);
 }
Exemple #3
0
 /// <summary>sadly it is needed for F# as it currently cannot express such generic constraint.
 /// See https://github.com/fsharp/fslang-suggestions/issues/255 for more info </summary>
 public static void RegisterAlias <KeyT, ValueT>(
     this IDiRegisterOnlyContainer self, LifeStyle?style = null) where ValueT : KeyT =>
 self.RegisterAlias(typeof(KeyT), typeof(ValueT), style);
Exemple #4
0
 public static void Register(IDiRegisterOnlyContainer container)
 {
     container.RegisterAlias <PhiladelphiaPowered.Domain.IHelloWorldService, WebClientHelloWorldService>(Philadelphia.Common.LifeStyle.Singleton);
 }