@@ -23,9 +23,39 @@ public string GetConnectionString()
2323 properties . Add ( "DefaultEndpointsProtocol" , Uri . UriSchemeHttp ) ;
2424 properties . Add ( "AccountName" , AzuriteBuilder . AccountName ) ;
2525 properties . Add ( "AccountKey" , AzuriteBuilder . AccountKey ) ;
26- properties . Add ( "BlobEndpoint" , new UriBuilder ( Uri . UriSchemeHttp , Hostname , GetMappedPublicPort ( AzuriteBuilder . BlobPort ) , AzuriteBuilder . AccountName ) . ToString ( ) ) ;
27- properties . Add ( "QueueEndpoint" , new UriBuilder ( Uri . UriSchemeHttp , Hostname , GetMappedPublicPort ( AzuriteBuilder . QueuePort ) , AzuriteBuilder . AccountName ) . ToString ( ) ) ;
28- properties . Add ( "TableEndpoint" , new UriBuilder ( Uri . UriSchemeHttp , Hostname , GetMappedPublicPort ( AzuriteBuilder . TablePort ) , AzuriteBuilder . AccountName ) . ToString ( ) ) ;
26+ properties . Add ( "BlobEndpoint" , GetBlobEndpoint ( ) ) ;
27+ properties . Add ( "QueueEndpoint" , GetQueueEndpoint ( ) ) ;
28+ properties . Add ( "TableEndpoint" , GetTableEndpoint ( ) ) ;
2929 return string . Join ( ";" , properties . Select ( property => string . Join ( "=" , property . Key , property . Value ) ) ) ;
3030 }
31+
32+ /// <summary>
33+ /// Gets the blob endpoint
34+ /// </summary>
35+ /// <returns>The azurite blob endpoint</returns>
36+ public string GetBlobEndpoint ( )
37+ {
38+ return new UriBuilder ( Uri . UriSchemeHttp , Hostname , GetMappedPublicPort ( AzuriteBuilder . BlobPort ) ,
39+ AzuriteBuilder . AccountName ) . ToString ( ) ;
40+ }
41+
42+ /// <summary>
43+ /// Gets the queue endpoint
44+ /// </summary>
45+ /// <returns>The azurite queue endpoint</returns>
46+ public string GetQueueEndpoint ( )
47+ {
48+ return new UriBuilder ( Uri . UriSchemeHttp , Hostname , GetMappedPublicPort ( AzuriteBuilder . QueuePort ) ,
49+ AzuriteBuilder . AccountName ) . ToString ( ) ;
50+ }
51+
52+ /// <summary>
53+ /// Gets the table endpoint
54+ /// </summary>
55+ /// <returns>The azurite table endpoint</returns>
56+ public string GetTableEndpoint ( )
57+ {
58+ return new UriBuilder ( Uri . UriSchemeHttp , Hostname , GetMappedPublicPort ( AzuriteBuilder . TablePort ) ,
59+ AzuriteBuilder . AccountName ) . ToString ( ) ;
60+ }
3161}
0 commit comments