Table of Contents

Class StorageUri

Namespace
Microsoft.WindowsAzure.Storage
Assembly
Microsoft.WindowsAzure.Storage.dll

Contains the URIs for both the primary and secondary locations of a Microsoft Azure Storage resource.

public sealed class StorageUri : IEquatable<StorageUri>
Inheritance
StorageUri
Implements
Inherited Members

Constructors

StorageUri(Uri)

Initializes a new instance of the StorageUri class using the primary endpoint for the storage account.

public StorageUri(Uri primaryUri)

Parameters

primaryUri Uri

The System.Uri for the primary endpoint.

StorageUri(Uri, Uri)

Initializes a new instance of the StorageUri class using the primary and secondary endpoints for the storage account.

public StorageUri(Uri primaryUri, Uri secondaryUri)

Parameters

primaryUri Uri

The System.Uri for the primary endpoint.

secondaryUri Uri

The System.Uri for the secondary endpoint.

Properties

PrimaryUri

The endpoint for the primary location for the storage account.

public Uri PrimaryUri { get; }

Property Value

Uri

The System.Uri for the primary endpoint.

SecondaryUri

The endpoint for the secondary location for the storage account.

public Uri SecondaryUri { get; }

Property Value

Uri

The System.Uri for the secondary endpoint.

Methods

Equals(StorageUri)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(StorageUri other)

Parameters

other StorageUri

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Determines whether the specified object is equal to this instance.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with this instance.

Returns

bool

true if the specified object is equal to this instance; otherwise, false.

GetHashCode()

Returns a hash code for this instance.

public override int GetHashCode()

Returns

int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

GetUri(StorageLocation)

Returns the URI for the storage account endpoint at the specified location.

public Uri GetUri(StorageLocation location)

Parameters

location StorageLocation

A StorageLocation enumeration value.

Returns

Uri

The System.Uri for the endpoint at the the specified location.

ToString()

Returns a string that represents this instance.

public override string ToString()

Returns

string

A string that represents this instance.

Operators

operator ==(StorageUri, StorageUri)

Compares two StorageUri objects for equivalency.

public static bool operator ==(StorageUri uri1, StorageUri uri2)

Parameters

uri1 StorageUri

The first StorageUri object to compare.

uri2 StorageUri

The second StorageUri object to compare.

Returns

bool

true if the StorageUri objects have equivalent values; otherwise, false.

operator !=(StorageUri, StorageUri)

Compares two StorageUri objects for non-equivalency.

public static bool operator !=(StorageUri uri1, StorageUri uri2)

Parameters

uri1 StorageUri

The first StorageUri object to compare.

uri2 StorageUri

The second StorageUri object to compare.

Returns

bool

true if the StorageUri objects have non-equivalent values; otherwise, false.