Save method
Saves the user configuration. Calling this method results in a call to EWS.
The name of the user configuration.
The Id of the folder in which to save the user configuration.
Implementation
Future<void> Save(String name, FolderId parentFolderId) async {
EwsUtilities.ValidateParam(name, "name");
EwsUtilities.ValidateParam(parentFolderId, "parentFolderId");
parentFolderId.ValidateExchangeVersion(_service.RequestedServerVersion);
if (!_isNew) {
throw InvalidOperationException(
"Calling Save isn't allowed because this user configuration isn't new. To apply local changes to this user configuration, call Update instead.",
);
}
_parentFolderId = parentFolderId;
_name = name;
// service.CreateUserConfiguration(this)
CreateUserConfigurationRequest request = CreateUserConfigurationRequest(
_service,
);
request.UserConfiguration = this;
await request.Execute();
_isNew = false;
_ResetIsDirty();
}