コード例 #1
0
 public TestController(
     ITransientDependency transientDependency,
     ISingletonDependency singletonDependency,
     HttpRequestMessage request)
 {
     _transientDependency = transientDependency;
     _singletonDependency = singletonDependency;
     _request             = request;
 }
コード例 #2
0
ファイル: Filter.cs プロジェクト: ptixed/WebApi.StructureMap
 public HeaderService(
     HttpResponseMessage response,
     ISingletonDependency singletonDependency,
     ITransientDependency transientDependency)
 {
     _response            = response;
     _singletonDependency = singletonDependency;
     _transientDependency = transientDependency;
 }
コード例 #3
0
 public MyOtherCoolService(
     ISingletonDependency singleton,
     ITransientDependency transient,
     IScopedDependency scoped)
 {
     _singleton = singleton;
     _transient = transient;
     _scoped    = scoped;
 }
コード例 #4
0
 public IfWorker(ILogger <IfWorker> logger,
                 ISingletonDependency singletonDependency,
                 IScopedDependency scopedDependency,
                 ITransientDependency transientDependency)
 {
     _logger = logger;
     _singletonDependency = singletonDependency;
     _scopedDependency    = scopedDependency;
     _transientDependency = transientDependency;
 }
コード例 #5
0
        public FakeNancyModule(ITransientDependency transientDepenency, ISingletonDependency singletonDependency, IPerRequestDependency perRequestDependency, IInstanceDependency instanceDependency)
        {
            TransientDependency  = transientDepenency;
            SingletonDependency  = singletonDependency;
            PerRequestDependency = perRequestDependency;
            InstanceDependency   = instanceDependency;

            Get["/"] = _ =>
            {
                return("Hello world :)");
            };
        }
コード例 #6
0
 public InitCounterWorker(AppSettings appSettings,
                          ILogger <InitCounterWorker> logger,
                          ISingletonDependency singletonDependency,
                          IScopedDependency scopedDependency,
                          ITransientDependency transientDependency)
 {
     _appSettings         = appSettings;
     _logger              = logger;
     _singletonDependency = singletonDependency;
     _scopedDependency    = scopedDependency;
     _transientDependency = transientDependency;
 }
コード例 #7
0
ファイル: Filter.cs プロジェクト: ptixed/WebApi.StructureMap
 public DummyService(
     HttpActionExecutedContext context,
     ISingletonDependency singletonDependency,
     ITransientDependency transientDependency)
 {
 }
コード例 #8
0
ファイル: AppExtensions.cs プロジェクト: artmind-net/appflow
 public static void LogInformation(this ILogger <BaseWorker> logger, BaseWorker self, IAppContext ctx, ISingletonDependency sng, IScopedDependency scp, ITransientDependency trn)
 {
     logger.LogInformation($"{self} - executing ...{Environment.NewLine} context: {ctx} | dependencies: [{sng}, {scp}, {trn}]");
 }