@@ -65,7 +65,7 @@ namespace SendSecureClient
65
65
{
66
66
try
67
67
{
68
- string token = GetUserToken ().Result ;
68
+ string token = GetUserTokenAsync ().GetAwaiter (). GetResult () ;
69
69
}
70
70
catch (XMedius .SendSecure .Exceptions .SendSecureException e )
71
71
{
@@ -77,9 +77,9 @@ namespace SendSecureClient
77
77
}
78
78
}
79
79
80
- public static async Task <string > GetUserToken ()
80
+ public static async Task <string > GetUserTokenAsync ()
81
81
{
82
- string token = await XMedius .SendSecure .Client .GetUserToken (" deathstar" , " darthvader" , " d@Rk$1De" , " DV-TIE/x1" , " TIE Advanced x1" , " The Force App" , new Uri (" https://portal.xmedius.com" ));
82
+ string token = await XMedius .SendSecure .Client .GetUserTokenAsync (" deathstar" , " darthvader" , " d@Rk$1De" , " DV-TIE/x1" , " TIE Advanced x1" , " The Force App" , new Uri (" https://portal.xmedius.com" ));
83
83
84
84
Console .WriteLine (token );
85
85
return token ;
@@ -112,7 +112,7 @@ namespace SendSecureClient
112
112
{
113
113
string token = " USER|1d495165-4953-4457-8b5b-4fcf801e621a" ;
114
114
115
- string previewUrl = SubmitSafebox (token ).GetAwaiter ().GetResult ();
115
+ string previewUrl = SubmitSafeboxAsync (token ).GetAwaiter ().GetResult ();
116
116
}
117
117
catch (XMedius .SendSecure .Exceptions .SendSecureException e )
118
118
{
@@ -124,7 +124,7 @@ namespace SendSecureClient
124
124
}
125
125
}
126
126
127
- public static async Task <string > SubmitSafebox (string token )
127
+ public static async Task <string > SubmitSafeboxAsync (string token )
128
128
{
129
129
var safebox2 = new XMedius .
SendSecure .
Helpers .
Safebox (
" [email protected] " );
130
130
safebox2 .Subject = " Family matters" ;
@@ -138,7 +138,7 @@ namespace SendSecureClient
138
138
safebox2 .Recipients .Add (recipient );
139
139
140
140
XMedius .SendSecure .Client client = new Client (token , " deathstar" , new Uri (" https://portal.xmedius.com" ));
141
- XMedius .SendSecure .Helpers .SafeboxResponse safeboxResponse = await client .SubmitSafebox (safebox2 );
141
+ XMedius .SendSecure .Helpers .SafeboxResponse safeboxResponse = await client .SubmitSafeboxAsync (safebox2 );
142
142
143
143
Console .WriteLine (safeboxResponse .PreviewUrl );
144
144
return safeboxResponse .PreviewUrl ;
@@ -154,7 +154,7 @@ namespace SendSecureClient
154
154
155
155
### Get User Token
156
156
```
157
- GetUserToken (enterpriseAccount, username, password, deviceId, deviceName, applicationType, endpoint, oneTimePassword, cancellationToken)
157
+ GetUserTokenAsync (enterpriseAccount, username, password, deviceId, deviceName, applicationType, endpoint, oneTimePassword, cancellationToken)
158
158
```
159
159
Creates and returns an API Token for a specific user within a SendSecure enterprise account.
160
160
Calling this method again with the exact same params will always return the same Token.
@@ -185,7 +185,7 @@ locale | String | The locale in which the server errors will be retur
185
185
186
186
### Get Enterprise Settings
187
187
```
188
- EnterpriseSettings (cancellationToken)
188
+ EnterpriseSettingsAsync (cancellationToken)
189
189
```
190
190
Returns all values/properties of the enterprise account's settings specific to SendSecure.
191
191
@@ -195,7 +195,7 @@ cancellationToken | CancellationToken | A cancellation token that can be used by
195
195
196
196
### Get Default Security Profile
197
197
```
198
- DefaultSecurityProfile (userEmail, cancellationToken)
198
+ DefaultSecurityProfileAsync (userEmail, cancellationToken)
199
199
```
200
200
Returns the default security profile (if it has been set) for a specific user, with all its setting values/properties.
201
201
@@ -206,7 +206,7 @@ cancellationToken | CancellationToken | A cancellation token that can be used by
206
206
207
207
### Get Security Profiles
208
208
```
209
- SecurityProfiles (userEmail, cancellationToken)
209
+ SecurityProfilesAsync (userEmail, cancellationToken)
210
210
```
211
211
Returns the list of all security profiles available to a specific user, with all their setting values/properties.
212
212
@@ -217,7 +217,7 @@ cancellationToken | CancellationToken | A cancellation token that can be used by
217
217
218
218
### Initialize SafeBox
219
219
```
220
- InitializeSafebox (safebox, cancellationToken)
220
+ InitializeSafeboxAsync (safebox, cancellationToken)
221
221
```
222
222
Pre-creates a SafeBox on the SendSecure system and returns the updated Safebox object with the necessary system parameters filled out (GUID, public encryption key, upload URL).
223
223
@@ -228,7 +228,7 @@ cancellationToken | CancellationToken | A cancellation token that can be used by
228
228
229
229
### Upload Attachment
230
230
```
231
- UploadAttachment (safebox, attachment, cancellationToken)
231
+ UploadAttachmentAsync (safebox, attachment, cancellationToken)
232
232
```
233
233
Uploads the specified file as an Attachment of the specified SafeBox and returns the updated Attachment object with the GUID parameter filled out.
234
234
@@ -240,7 +240,7 @@ cancellationToken | CancellationToken | A cancellation token that can be used by
240
240
241
241
### Commit SafeBox
242
242
```
243
- CommitSafebox (safebox, cancellationToken)
243
+ CommitSafeboxAsync (safebox, cancellationToken)
244
244
```
245
245
Finalizes the creation (commit) of the SafeBox on the SendSecure system.
246
246
This actually "Sends" the SafeBox with all content and contact info previously specified.
@@ -252,7 +252,7 @@ cancellationToken | CancellationToken | A cancellation token that can be used by
252
252
253
253
### Submit SafeBox
254
254
```
255
- SubmitSafebox (safebox, cancellationToken)
255
+ SubmitSafeboxAsync (safebox, cancellationToken)
256
256
```
257
257
This method is a high-level combo that initializes the SafeBox, uploads all attachments and commits the SafeBox.
258
258
0 commit comments