Class ShareUriBuilder
The ShareUriBuilder class provides a convenient way to modify the contents of a System.Uri instance to point to different Azure Storage resources like an account, share, or file.
For more information, see Naming and Referencing Shares, Directories, Files, and Metadata.
public class ShareUriBuilder
- Inheritance
-
ShareUriBuilder
- Inherited Members
Constructors
ShareUriBuilder(Uri)
Initializes a new instance of the ShareUriBuilder class with the specified System.Uri.
public ShareUriBuilder(Uri uri)
Parameters
uri
UriThe System.Uri to a storage resource.
Properties
AccountName
Gets or sets the Azure Storage account name.
public string AccountName { get; set; }
Property Value
DirectoryOrFilePath
Gets or sets the path of the directory or file. The value defaults to Empty if not present in the System.Uri. Example: "mydirectory/myfile"
public string DirectoryOrFilePath { get; set; }
Property Value
Host
Gets or sets the Domain Name System (DNS) host name or IP address of a server.
Example: "account.file.core.windows.net"
public string Host { get; set; }
Property Value
Port
Gets or sets the port number of the URI.
public int Port { get; set; }
Property Value
Query
Gets or sets any query information included in the URI that's not relevant to addressing Azure storage resources.
public string Query { get; set; }
Property Value
Sas
Gets or sets the Shared Access Signature query parameters, or null if not present in the System.Uri.
public SasQueryParameters Sas { get; set; }
Property Value
- SasQueryParameters
Scheme
Gets or sets the scheme name of the URI. Example: "https"
public string Scheme { get; set; }
Property Value
ShareName
Gets or sets the name of a file storage share. The value defaults to Empty if not present in the System.Uri.
public string ShareName { get; set; }
Property Value
Snapshot
Gets or sets the name of a file snapshot. The value defaults to Empty if not present in the System.Uri.
public string Snapshot { get; set; }
Property Value
Methods
ToString()
Returns the display string for the specified ShareUriBuilder instance.
public override string ToString()
Returns
- string
The display string for the specified ShareUriBuilder instance.
ToUri()
Returns the System.Uri constructed from the ShareUriBuilder's fields. The System.Uri.Query property contains the SAS and additional query parameters.
public Uri ToUri()
Returns
- Uri