コード例 #1
0
        public static RestClient Build(Action <IClientSettingsBuilder> builder)
        {
            var settings = new ClientSettingsBuilder();

            builder(settings);

            return(new RestClient(settings.Build()));
        }
コード例 #2
0
        public static IRestClient AsRestClient(this IHttpClient client, Action <IClientSettingsBuilder> settings,
                                               IBuildContext context)
        {
            var builder = new ClientSettingsBuilder();

            settings(builder);

            return(client.AsRestClient(builder.Build(context)));
        }