This repository was archived by the owner on Apr 8, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Microsoft.WindowsAzure.Storage/includes/was Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -74,11 +74,22 @@ namespace azure { namespace storage {
74
74
// / Gets the storage account credentials for the service client.
75
75
// / </summary>
76
76
// / <returns>The storage account credentials for the service client.</returns>
77
- const azure::storage::storage_credentials& credentials () const
77
+ const azure::storage::storage_credentials& credentials ()
78
78
{
79
+ pplx::extensibility::scoped_read_lock_t guard (m_mutex);
79
80
return m_credentials;
80
81
}
81
82
83
+ // / <summary>
84
+ // / Sets the storage credentials to use for the service client.
85
+ // / </summary>
86
+ // / <param name="credentials">The <see cref="azure::storage::storage_credentials" /> to use.</param>
87
+ void set_storage_credentials (azure::storage::storage_credentials credentials)
88
+ {
89
+ pplx::extensibility::scoped_rw_lock_t guard (m_mutex);
90
+ m_credentials = std::move (credentials);
91
+ }
92
+
82
93
// / <summary>
83
94
// / Gets the authentication scheme to use to sign HTTP requests for the service client.
84
95
// / </summary>
@@ -150,6 +161,7 @@ namespace azure { namespace storage {
150
161
151
162
private:
152
163
164
+ pplx::extensibility::reader_writer_lock_t m_mutex;
153
165
storage_uri m_base_uri;
154
166
azure::storage::storage_credentials m_credentials;
155
167
azure::storage::authentication_scheme m_authentication_scheme;
You can’t perform that action at this time.
0 commit comments