Table of Contents

Method Create

Namespace
MailFathom.Infrastructure.ObjectStorage
Assembly
MailFathom.Infrastructure.dll

Create(Uri, string, string, string, bool, TimeSpan, TimeSpan)

Composes the endpoint a deployment's configuration describes.

public static ObjectStorageEndpoint Create(Uri address, string bucket, string keyPrefix, string region, bool usePathStyleAddressing, TimeSpan connectTimeout, TimeSpan requestTimeout)

Parameters

address Uri

The absolute address requests are sent to.

bucket string

The bucket every object is written into and read from.

keyPrefix string

The prefix keys are written under, which may be empty and is normalized to end in /.

region string

The signing region, which may be empty and then takes DefaultRegion.

usePathStyleAddressing bool

Whether the bucket is addressed in the path rather than in the host name.

connectTimeout TimeSpan

How long establishing a connection may take.

requestTimeout TimeSpan

How long one whole request may take.

Returns

ObjectStorageEndpoint

The composed endpoint.

Remarks

Called only after configuration validation has passed, so what is left here is normalization rather than a second set of rules.

Exceptions

ArgumentNullException

Thrown when address, bucket, keyPrefix, or region is null.

ArgumentException

Thrown when address is not absolute, or bucket is blank.

ArgumentOutOfRangeException

Thrown when either timeout is not positive.