File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
sdk/storage/azure-storage-blobs/samples Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,20 @@ std::string GetConnectionString()
2626
2727std::string GetAccountName ()
2828{
29- return Azure::Storage::_internal::ParseConnectionString (GetConnectionString ()).AccountName ;
29+ const auto connectionString = GetConnectionString ();
30+ const std::string property = " AccountName=" ;
31+ auto pos1 = connectionString.find (property);
32+ auto pos2 = connectionString.find (" ;" , pos1);
33+ return connectionString.substr (pos1 + property.length (), pos2 - pos1 - property.length ());
3034}
3135
3236std::string GetAccountKey ()
3337{
34- return Azure::Storage::_internal::ParseConnectionString (GetConnectionString ()).AccountKey ;
38+ const auto connectionString = GetConnectionString ();
39+ const std::string property = " AccountKey=" ;
40+ auto pos1 = connectionString.find (property);
41+ auto pos2 = connectionString.find (" ;" , pos1);
42+ return connectionString.substr (pos1 + property.length (), pos2 - pos1 - property.length ());
3543}
3644
3745int main ()
You can’t perform that action at this time.
0 commit comments