public FromToActivator Build()
            {
                var loggerFactory = new LoggerFactory();
                var logger        = loggerFactory.CreateLogger <XabarilModule>();

                var runtimeParameterAccessor = RuntimeParameterAccessorBuilder.Build(_parameters);

                return(new FromToActivator(logger, runtimeParameterAccessor));
            }
Example #2
0
            public RolloutUsernameActivator Build()
            {
                var loggerFactory = new LoggerFactory();
                var logger        = loggerFactory.CreateLogger <XabarilModule>();

                var runtimeParameterAccessor = RuntimeParameterAccessorBuilder.Build(_parameters);

                return(new RolloutUsernameActivator(logger, runtimeParameterAccessor, _userProvider));
            }
Example #3
0
            public LocationActivator Build()
            {
                var loggerFactory = new LoggerFactory();
                var logger        = loggerFactory.CreateLogger <XabarilModule>();

                var runtimeParameterAccessor = RuntimeParameterAccessorBuilder.Build(_parameters);

                var httpContextAccesor = new HttpContextAccessor();

                httpContextAccesor.HttpContext = new DefaultHttpContext();
                httpContextAccesor.HttpContext.Connection.RemoteIpAddress = new IPAddress(0x2414188f);

                return(new LocationActivator(logger, runtimeParameterAccessor, httpContextAccesor, _geoLocationProvider));
            }
            public RolloutHeaderValueActivator Build()
            {
                var loggerFactory = new LoggerFactory();
                var logger        = loggerFactory.CreateLogger <XabarilModule>();

                var runtimeParameterAccessor = RuntimeParameterAccessorBuilder.Build(_parameters);

                var httpContextAccesor = new HttpContextAccessor();

                httpContextAccesor.HttpContext = new DefaultHttpContext();

                httpContextAccesor.HttpContext.Request.Headers.Add(_header, _value);

                return(new RolloutHeaderValueActivator(logger, runtimeParameterAccessor, httpContextAccesor));
            }
Example #5
0
            public HeaderValueActivator Build()
            {
                var loggerFactory = new LoggerFactory();
                var logger        = loggerFactory.CreateLogger <XabarilModule>();

                var runtimeParameterAccessor = RuntimeParameterAccessorBuilder.Build(_parameters);

                var httpContextAccesor = new HttpContextAccessor();

                httpContextAccesor.HttpContext = new DefaultHttpContext();

                foreach (var key in _headers.Keys)
                {
                    httpContextAccesor.HttpContext.Request.Headers.Add(key, _headers[key]);
                }

                return(new HeaderValueActivator(logger, runtimeParameterAccessor, httpContextAccesor));
            }