Esempio n. 1
0
 public SubObjectOne(IFirstService firstService)
 {
     if (firstService == null)
     {
         throw new ArgumentNullException(nameof(firstService));
     }
 }
Esempio n. 2
0
 public SubObjectOne(IFirstService firstService)
 {
     if (firstService == null)
     {
         throw new ArgumentNullException("firstService");
     }
 }
Esempio n. 3
0
 public FirstViewModel(First first, IFirstService firstService)
 {
     Argument.IsNotNull(() => first);
     Argument.IsNotNull(() => firstService);
     _firstService = firstService;
     First = first;
     WriteFirst = new Command(OnWriteFirstExecute);
 }
 public MultipleParameters(IFirstService firstService, ISecondService secondService, IThirdService thirdService,
                           IFourthService fourthService)
 {
     _firstService  = firstService;
     _secondService = secondService;
     _thirdService  = thirdService;
     _fourthService = fourthService;
 }
Esempio n. 5
0
 public HomeController
 (
     ILogger <HomeController> logger,
     IFirstService firstService
 )
 {
     _logger       = logger;
     _firstService = firstService;
 }
 public WeatherForecastController(ILogger <WeatherForecastController> logger,
                                  IFirstService firstService,
                                  ISecondService secondService,
                                  IThirdService thirdService,
                                  IFifthService fifthService,
                                  ISeventhService seventhService,
                                  IServiceScopeFactory serviceScopeFactory)
 {
     _logger                   = logger;
     this._firstService        = firstService;
     this._thirdService        = thirdService;
     this._fifthService        = fifthService;
     this._secondService       = secondService;
     this._seventhService      = seventhService;
     this._serviceScopeFactory = serviceScopeFactory;
 }
Esempio n. 7
0
        public Complex1(
            IFirstService firstService,
            ISecondService secondService,
            IThirdService thirdService,
            ISubObjectOne subObjectOne,
            ISubObjectTwo subObjectTwo,
            ISubObjectThree subObjectThree)
        {
            if (firstService == null)
            {
                throw new ArgumentNullException("firstService");
            }

            if (secondService == null)
            {
                throw new ArgumentNullException("secondService");
            }

            if (thirdService == null)
            {
                throw new ArgumentNullException("thirdService");
            }

            if (subObjectOne == null)
            {
                throw new ArgumentNullException("subObjectOne");
            }

            if (subObjectTwo == null)
            {
                throw new ArgumentNullException("subObjectTwo");
            }

            if (subObjectThree == null)
            {
                throw new ArgumentNullException("subObjectThree");
            }

            System.Threading.Interlocked.Increment(ref counter);
        }
Esempio n. 8
0
        public Complex(
            IFirstService firstService,
            ISecondService secondService,
            IThirdService thirdService,
            ISubObjectOne subObjectOne,
            ISubObjectTwo subObjectTwo,
            ISubObjectThree subObjectThree)
        {
            if (firstService == null)
            {
                throw new ArgumentNullException("firstService");
            }

            if (secondService == null)
            {
                throw new ArgumentNullException("secondService");
            }

            if (thirdService == null)
            {
                throw new ArgumentNullException("thirdService");
            }

            if (subObjectOne == null)
            {
                throw new ArgumentNullException("subObjectOne");
            }

            if (subObjectTwo == null)
            {
                throw new ArgumentNullException("subObjectTwo");
            }

            if (subObjectThree == null)
            {
                throw new ArgumentNullException("subObjectThree");
            }

            Instances++;
        }
Esempio n. 9
0
        public Complex2(
            IFirstService firstService,
            ISecondService secondService,
            IThirdService thirdService,
            ISubObjectOne subObjectOne,
            ISubObjectTwo subObjectTwo,
            ISubObjectThree subObjectThree)
        {
            if (firstService == null)
            {
                throw new ArgumentNullException("firstService");
            }

            if (secondService == null)
            {
                throw new ArgumentNullException("secondService");
            }

            if (thirdService == null)
            {
                throw new ArgumentNullException("thirdService");
            }

            if (subObjectOne == null)
            {
                throw new ArgumentNullException("subObjectOne");
            }

            if (subObjectTwo == null)
            {
                throw new ArgumentNullException("subObjectTwo");
            }

            if (subObjectThree == null)
            {
                throw new ArgumentNullException("subObjectThree");
            }

            System.Threading.Interlocked.Increment(ref counter);
        }
Esempio n. 10
0
        public Complex2(
            IFirstService firstService,
            ISecondService secondService,
            IThirdService thirdService,
            ISubObjectOne subObjectOne,
            ISubObjectTwo subObjectTwo,
            ISubObjectThree subObjectThree)
        {
            if (firstService == null)
            {
                throw new ArgumentNullException("firstService");
            }

            if (secondService == null)
            {
                throw new ArgumentNullException("secondService");
            }

            if (thirdService == null)
            {
                throw new ArgumentNullException("thirdService");
            }

            if (subObjectOne == null)
            {
                throw new ArgumentNullException("subObjectOne");
            }

            if (subObjectTwo == null)
            {
                throw new ArgumentNullException("subObjectTwo");
            }

            if (subObjectThree == null)
            {
                throw new ArgumentNullException("subObjectThree");
            }

            Instances++;
        }
Esempio n. 11
0
 public HomeController(IFirstService firstService)
 {
     _firstService = firstService;
 }
Esempio n. 12
0
 public BooksController(IFirstService FirstService)
 {
     this.FirstService = FirstService;
 }
Esempio n. 13
0
 public TMid(IFirstService firstService)
 {
     _firstService = firstService;
 }
Esempio n. 14
0
 public FirstViewModel(IFirstService firstService)
     : this(new First(), firstService)
 {
 }
 public HelloController(IFirstService firstService)
 {
     _iFirstService = firstService;
 }
Esempio n. 16
0
 public SimpleFirstServiceDecorator(IFirstService firstService)
 {
 }
 public AdvancedFirstServiceDecorator(IFirstService firstService)
 {
 }
Esempio n. 18
0
 public AdvancedFirstServiceDecorator(IFirstService firstService)
 {
 }
Esempio n. 19
0
 public Consumer1(IFirstService service)
 {
     this.service = service;
 }
 public ComplexFirstServiceDecorator(IFirstService firstService)
 {
 }
 public SimpleFirstServiceDecorator(IFirstService firstService)
 {
 }
 public FacadeService(IFirstService firstService, ISecondService secondService)
 {
     _firstService  = firstService;
     _secondService = secondService;
 }
Esempio n. 23
0
 public TestWithDependency2(IFirstService service)
 {
 }
Esempio n. 24
0
 public SampleController(IFirstService firstService)
 {
     _firstService = firstService;
 }
Esempio n. 25
0
 public CompositionService(IFirstService firstService, ISecondService secondService)
 {
 }
 // GET: Default/Details/5
 public ActionResult Details([FromServices] IFirstService FirstService)
 {
     _FirstService = FirstService;
     return(Content(_FirstService.WelcomeEquinox()));
 }
 public SecondService(IFirstService firstService)
 {
     _firstService = firstService;
 }
Esempio n. 28
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, IFirstService FirstService)
        {
            loggerFactory.AddConsole();
            app.UseRewriter(new RewriteOptions()
                            //.AddRedirect("redirect-rule/(.*)", "redirected/$1")
                            //.AddRedirect(@"product/Create/(\d+)", "product/Details?id=$1")
                            .AddRewrite(@"product/Create/(\d+)", "product/Details?id=$1", skipRemainingRules: true)
                            //.AddRewrite(@"^rewrite-rule/(\d+)", "rewritten?var1=$1&var2=$2", skipRemainingRules: false)
                            .Add(new RedirectImageRequests(".png", "/png-images")));
            //.Add(new RedirectImageRequests(".jpg", "/jpg-images")));



            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }


            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller=Product}/{action=Index}/{id?}");
            });
            //app.Use(async (context, next) =>
            //{
            //    string agent = context.Request.Headers["user-agent"].ToString();

            //    if (!string.IsNullOrEmpty(context.Request.QueryString.Value))
            //    {
            //        context.Response.Headers.Add("X-Frame-Options", "localhost");
            //        //context.Response.Headers.Add("X-Content-Type-Options", configuration["CustomMessage"]);
            //        await context.Response.WriteAsync("Query string is not allowed in Middleware pipeline");
            //        await next.Invoke();
            //    }
            //});

            app.Map("/map1", HandleMapMiddlewareOne);

            app.Map("/map2", HandleMapMiddlewareTwo);

            //app.MapWhen(context => context.Request.QueryString.Value.Equals("DeviceId"), appBuilder =>
            //{
            //    app.Run(async context =>
            //    {
            //        await context.Response.WriteAsync("Response for devices");

            //    });
            //});

            app.MapWhen(context => context.Request.Query.ContainsKey("branch"), HandleBranch);

            //Commented for testing purpose only
            app.UseSecurityMiddleware();

            app.Run(async(context) =>
            {
                //throw new Exception("From Middle ware");
                //string welcomeMsg = Configuration["WelcomeEquinox"];
                string welcomeMsg = FirstService.WelcomeEquinox();
                await context.Response.WriteAsync(welcomeMsg);
                //await context.Response.WriteAsync("welcomeMsg");
            });
        }
Esempio n. 29
0
 public ServiceController(IFirstService firstService, ISecondService secondService, IHttpClientFactory httpClientFactory)
 {
     _httpClientFactory = httpClientFactory;
 }
Esempio n. 30
0
 public ComplexFirstServiceDecorator(IFirstService firstService)
 {
 }
Esempio n. 31
0
 public void SetUp()
 {
     service = new FirstService();
 }