コード例 #1
0
        public static IApplicationBuilder UseCamoServer(this IApplicationBuilder builder, PathString pathMatch, CamoServerSettings settings, HttpClient httpClient)
        {
            var server = new CamoServer(pathMatch, settings, httpClient);

            builder.Use(async (context, next) =>
            {
                await next();
                await server.Invoke(context);
            });

            return builder;
        }
コード例 #2
0
ファイル: CamoServer.cs プロジェクト: maartenba/CamoDotNet
 public CamoServer(PathString pathPrefix, CamoServerSettings settings, HttpClient httpClient)
 {
     _pathPrefix = pathPrefix;
     _settings = settings;
     _httpClient = httpClient;
     _signature = new CamoSignature(_settings.SharedKey);
 }
コード例 #3
0
 public static IApplicationBuilder UseCamoServer(this IApplicationBuilder builder, string pathMatch, CamoServerSettings settings, HttpClient httpClient)
 {
     return UseCamoServer(builder, new PathString(pathMatch), settings, httpClient);
 }
コード例 #4
0
ファイル: CamoServer.cs プロジェクト: maartenba/CamoDotNet
 public CamoServer(CamoServerSettings settings, HttpClient httpClient)
     : this(new PathString(), settings, httpClient)
 {
 }