示例#1
0
    public async Task StaticClient()
    {
        NullNetworkDriver driver = new NullNetworkDriver();

        WasabiConfig config = new WasabiConfig();

        config.Credentials = new StringAccessKey("ExampleKeyId00000000", "wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY");
        config.Region      = WasabiRegion.EuCentral1;

        using WasabiClient client = new WasabiClient(config, driver);

        await client.GetObjectAsync("testbucket", "GetObjectAsync").ConfigureAwait(false);

        Assert.Equal("https://testbucket.s3.eu-central-1.wasabisys.com/GetObjectAsync", driver.LastUrl);
    }
示例#2
0
 public WasabiClient(WasabiConfig config, INetworkDriver networkDriver) : base(new WasabiInputValidator(), config, networkDriver)
 {
 }
示例#3
0
 /// <summary>Creates a new instance of <see cref="WasabiClient" /></summary>
 /// <param name="config">The configuration you want to use</param>
 /// <param name="proxy">A web proxy (optional)</param>
 public WasabiClient(WasabiConfig config, IWebProxy?proxy = null) : base(new WasabiInputValidator(), config, proxy)
 {
 }