Пример #1
0
        public RaygunAspNetMiddleware(RequestDelegate next, IOptions <RaygunSettings> settings, RaygunMiddlewareSettings middlewareSettings)
        {
            _next = next;
            _middlewareSettings = middlewareSettings;

            _settings = _middlewareSettings.ClientProvider.GetRaygunSettings(settings.Value ?? new RaygunSettings());

            _aspNetCoreInitializer = new AspNetCoreInitializer();
            _aspNetCoreInitializer.Initialize(_settings.ApplicationIdentifier);
        }
Пример #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="app"></param>
        /// <param name="builder"></param>
        /// <returns></returns>
        public static IApplicationBuilder UseRpcLite(this IApplicationBuilder app, Action <RpcConfigBuilder> builder)
        {
            var builderObj = new RpcConfigBuilder();

            builder(builderObj);
            var config = builderObj.Build();

            AspNetCoreInitializer.Initialize(app, config);
            return(app);
        }
Пример #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="app"></param>
 /// <param name="rpcConfig"></param>
 /// <returns></returns>
 public static IApplicationBuilder UseRpcLite(this IApplicationBuilder app, RpcConfig rpcConfig)
 {
     AspNetCoreInitializer.Initialize(app, rpcConfig);
     return(app);
 }
Пример #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="routes"></param>
 /// <param name="rpcConfig"></param>
 /// <returns></returns>
 public static IRouteBuilder UseRpcLite(this IRouteBuilder routes, RpcConfig rpcConfig)
 {
     AspNetCoreInitializer.Initialize(routes, rpcConfig);
     return(routes);
 }