• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Owin.OwinMiddleware类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Microsoft.Owin.OwinMiddleware的典型用法代码示例。如果您正苦于以下问题:C# OwinMiddleware类的具体用法?C# OwinMiddleware怎么用?C# OwinMiddleware使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



OwinMiddleware类属于Microsoft.Owin命名空间,在下文中一共展示了OwinMiddleware类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: UrsaHandler

        /// <summary>Initializes a new instance of the <see cref="UrsaHandler"/> class.</summary>
        /// <param name="next">Next middleware in the pipeline.</param>
        /// <param name="requestHandler">The request handler.</param>
        public UrsaHandler(OwinMiddleware next, IRequestHandler<RequestInfo, ResponseInfo> requestHandler) : base(next)
        {
            if (requestHandler == null)
            {
                throw new ArgumentNullException("requestHandler");
            }

            _requestHandler = requestHandler;
        }
开发者ID:alien-mcl,项目名称:URSA,代码行数:12,代码来源:UrsaHandler.cs


示例2: RequestProcTimeMiddleware

 public RequestProcTimeMiddleware(OwinMiddleware next, RequestProcTimeOption requestProcTimeOption = null)
     : base(next)
 {
     _next = next;
     //第一个参数是固定的,后边还可以添加自定义的其它参数
     _requestProcTimeOption = requestProcTimeOption;
 }
开发者ID:a526757124,项目名称:YouTravelProject,代码行数:7,代码来源:RequestProcTimeMiddleware.cs


示例3: RequestLogMiddleware

 public RequestLogMiddleware(OwinMiddleware next, RequestLogOption requestLogOption)
     : base(next)
 {
     _next = next;
     //第一个参数是固定的,后边还可以添加自定义的其它参数
     _requestLogOption = requestLogOption;
 }
开发者ID:a526757124,项目名称:YouTravelProject,代码行数:7,代码来源:RequestLogMiddleware.cs


示例4: ThrottlingMiddleware

        /// <summary>
        /// Initializes a new instance of the <see cref="ThrottlingMiddleware"/> class.
        /// Persists the policy object in cache using <see cref="IPolicyRepository"/> implementation.
        /// The policy object can be updated by <see cref="ThrottleManager"/> at runtime. 
        /// </summary>
        /// <param name="policy">
        /// The policy.
        /// </param>
        /// <param name="policyRepository">
        /// The policy repository.
        /// </param>
        /// <param name="repository">
        /// The repository.
        /// </param>
        /// <param name="logger">
        /// The logger.
        /// </param>
        /// <param name="ipAddressParser">
        /// The IpAddressParser
        /// </param>
        public ThrottlingMiddleware(OwinMiddleware next, 
            ThrottlePolicy policy, 
            IPolicyRepository policyRepository, 
            IThrottleRepository repository, 
            IThrottleLogger logger,
            IIpAddressParser ipAddressParser)
            : base(next)
        {
            core = new ThrottlingCore();
            core.Repository = repository;
            Repository = repository;
            Logger = logger;

            if (ipAddressParser != null)
            {
                core.IpAddressParser = ipAddressParser;
            }

            QuotaExceededResponseCode = (HttpStatusCode)429;

            this.policy = policy;
            this.policyRepository = policyRepository;

            if (policyRepository != null)
            {
                policyRepository.Save(ThrottleManager.GetPolicyKey(), policy);
            }
        }
开发者ID:boro2g,项目名称:WebApiThrottle,代码行数:48,代码来源:ThrottlingMiddleware.cs


示例5: ForceSslWhenAuthenticatedMiddleware

 public ForceSslWhenAuthenticatedMiddleware(OwinMiddleware next, IAppBuilder app, string cookieName, int sslPort)
     : base(next)
 {
     CookieName = cookieName;
     SslPort = sslPort;
     _logger = app.CreateLogger<ForceSslWhenAuthenticatedMiddleware>();
 }
开发者ID:henrycomein,项目名称:NuGetGallery,代码行数:7,代码来源:ForceSslWhenAuthenticatedMiddleware.cs


示例6: RequestLogMiddleware

 public RequestLogMiddleware(OwinMiddleware next, Action<string> requestLogProceAction)
     : base(next)
 {
     _next = next;
     //第一个参数是固定的,后边还可以添加自定义的其它参数
     _requestLogProceAction = requestLogProceAction;
 }
开发者ID:a526757124,项目名称:YCTYProject,代码行数:7,代码来源:RequestLogMiddleware.cs


示例7: KittenStatusCodeMiddleware

 public KittenStatusCodeMiddleware(OwinMiddleware next, KittenStatusCodeOptions options)
     : base(next)
 {
     this.options = options;
     links = new Dictionary<int, string>();
     GenerateLinks();
 }
开发者ID:Tratcher,项目名称:Owin-Dogfood,代码行数:7,代码来源:KittenStatusCodeMiddleware.cs


示例8: ConsulateMiddleware

 public ConsulateMiddleware(OwinMiddleware next, Uri consulBase) : base(next) {
     _consulBase = consulBase;
     _consulClient = new HttpClient(new TracingHandler(new HttpClientHandler()))
     {
         BaseAddress = consulBase
     };
 }
开发者ID:jango2015,项目名称:Consulate,代码行数:7,代码来源:ConsulateMiddleware.cs


示例9: PassThroughMiddleware

 public PassThroughMiddleware(OwinMiddleware next, string p1, int p2, object p3)
     : base(next)
 {
     this.p1 = p1;
     this.p2 = p2;
     this.p3 = p3;
 }
开发者ID:Xamarui,项目名称:Katana,代码行数:7,代码来源:OwinMiddlewareFacts.cs


示例10: RequestTrackingMiddleware

 public RequestTrackingMiddleware(OwinMiddleware next, TelemetryConfiguration telemetryConfiguration) 
     : base(next)
 {
     _telemetryClient = telemetryConfiguration == null 
         ? new TelemetryClient()
         : new TelemetryClient(telemetryConfiguration);
 }
开发者ID:NuGet,项目名称:NuGet.Services.Metadata,代码行数:7,代码来源:RequestTrackingMiddleware.cs


示例11: SwaggerMiddleware

 /// <summary>Initializes a new instance of the <see cref="SwaggerMiddleware"/> class.</summary>
 /// <param name="next">The next middleware.</param>
 /// <param name="path">The path.</param>
 /// <param name="controllerTypes">The controller types.</param>
 /// <param name="settings">The settings.</param>
 /// <param name="schemaGenerator">The schema generator.</param>
 public SwaggerMiddleware(OwinMiddleware next, string path, IEnumerable<Type> controllerTypes, SwaggerOwinSettings settings, SwaggerJsonSchemaGenerator schemaGenerator)
     : base(next)
 {
     _path = path;
     _controllerTypes = controllerTypes;
     _settings = settings;
     _schemaGenerator = schemaGenerator;
 }
开发者ID:NSwag,项目名称:NSwag,代码行数:14,代码来源:SwaggerMiddleware.cs


示例12: HttpCorrelator

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="next">The next piece of OWIN middleware to invoke</param>
 /// <param name="httpCorrelationHeaderKey">The name of the header to use for the correlation ID</param>
 public HttpCorrelator(OwinMiddleware next, string httpCorrelationHeaderKey) : base(next)
 {
     _httpCorrelationHeaderKey = httpCorrelationHeaderKey;
     if (string.IsNullOrWhiteSpace(httpCorrelationHeaderKey))
     {
         throw new ArgumentException("A correlation header name must be provided", nameof(httpCorrelationHeaderKey));
     }
 }
开发者ID:gorkar,项目名称:AccidentalFish.ApplicationSupport.Owin,代码行数:13,代码来源:HttpCorrelator.cs


示例13: PersistentConnectionMiddleware

 public PersistentConnectionMiddleware(OwinMiddleware next,
                                       Type connectionType,
                                       ConnectionConfiguration configuration)
     : base(next)
 {
     _connectionType = connectionType;
     _configuration = configuration;
 }
开发者ID:Choulla-Naresh8264,项目名称:SignalR,代码行数:8,代码来源:PersistentConnectionMiddleware.cs


示例14: Init

 public void Init()
 {
     _fixture = new Fixture().Customize(new AutoRhinoMockCustomization());
     _nextMiddleware = MockRepository.GenerateMock<OwinMiddleware>(new FakeRootMiddelware());
     _handlerPool = new ThermometerRouteHandlerPool();
     
     _sut = new QuestionRouteMiddleware(_nextMiddleware, _handlerPool);
 }
开发者ID:chenghuang-mdsol,项目名称:Medidata.Cloud.Thermometer,代码行数:8,代码来源:QuestionRouteMiddlewareTests.cs


示例15: ResourceMiddleware

 public ResourceMiddleware(OwinMiddleware next) : base(next)
 {
     resourceWebRequestFactory = new ResourceWebRequestFactory();
     resourceWebRequestFactory.PluginAliasMap = base.pluginAliasDict;
     resourceWebRequestFactory.AssemblyMap = new Dictionary<String, Assembly>();
     //注册resource:前缀URI处理程序
     WebRequest.RegisterPrefix("resource:", resourceWebRequestFactory);
 }
开发者ID:aaasoft,项目名称:Quick.OwinMVC,代码行数:8,代码来源:ResourceMiddleware.cs


示例16: SaasKitOwinAdapter

        public SaasKitOwinAdapter(OwinMiddleware next, ISaasKitEngine engine) : base(next)
        {
            if (engine == null)
            {
                throw new ArgumentNullException("engine");
            }

            this.engine = engine;
        }
开发者ID:kether667,项目名称:saaskit,代码行数:9,代码来源:SaasKitOwinAdapter.cs


示例17: IsPrivateFolderMiddleware

 public IsPrivateFolderMiddleware(OwinMiddleware next, WebserverOptions options)
     : base(next)
 {
     if (options == null)
     {
         throw new ArgumentNullException("options");
     }
     _options = options;
 }
开发者ID:JuergenGutsch,项目名称:dotnetpro-node-vs-net,代码行数:9,代码来源:IsPrivateFolderMiddleware.cs


示例18: ClaimsTransformationMiddleware

        public ClaimsTransformationMiddleware(OwinMiddleware next, ClaimsAuthenticationManager claimsAuthenticationManager) : base(next)
        {
            if (claimsAuthenticationManager == null)
            {
                throw new ArgumentNullException("claimsAuthenticationManager");
            }

            _claimsAuthenticationManager = claimsAuthenticationManager;
        }
开发者ID:nanderto,项目名称:Thinktecture.AuthorizationServer,代码行数:9,代码来源:ClaimsTransformationMiddleware.cs


示例19: GenkanMiddleware

        /// <summary>
        /// Creates the GenkanMiddleware to use with owin.
        /// </summary>
        /// <param name="next">The next middleware to call after Genkan.</param>
        /// <param name="tobira">The <see cref="ITobira"/> to forward the call to.</param>
        /// <param name="requestResponseFactory">The <see cref="IRequestResponseFactory"/> to create the request and response.</param>
        public GenkanMiddleware(OwinMiddleware next, ITobira tobira, IRequestResponseFactory requestResponseFactory)
            : base(next)
        {
            if (tobira == null) throw new ArgumentNullException(nameof(tobira));
            if (requestResponseFactory == null) throw new ArgumentNullException(nameof(requestResponseFactory));

            _requestResponseFactory = requestResponseFactory;
            _tobira = tobira;
        }
开发者ID:shanegrueling,项目名称:Genkan,代码行数:15,代码来源:GenkanMiddleware.cs


示例20: ResourceExistMiddleware

 public ResourceExistMiddleware(OwinMiddleware next, WebserverOptions options)
     : base(next)
 {
     if (options == null)
     {
         throw new ArgumentNullException("options");
     }
     _options = options;
 }
开发者ID:JuergenGutsch,项目名称:dotnetpro-node-vs-net,代码行数:9,代码来源:ResourceExistMiddleware.cs



注:本文中的Microsoft.Owin.OwinMiddleware类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Hosting.StartOptions类代码示例发布时间:2022-05-26
下一篇:
C# Word.Document类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap