Beispiel #1
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="builder"></param>
        /// <returns></returns>
        public static void Initialize(Action<RpcConfigBuilder> builder)
        {
            var builderObj = new RpcConfigBuilder();
            builder(builderObj);
            var config = builderObj.Build();

            Initialize(config);
        }
Beispiel #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="builder"></param>
        /// <returns></returns>
        public static void Initialize(Action <RpcConfigBuilder> builder)
        {
            var builderObj = new RpcConfigBuilder();

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

            Initialize(config);
        }
        /// <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;
        }
Beispiel #4
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);
        }
Beispiel #5
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public AppHost Build()
 {
     return(new AppHost(_config.Build()));
 }