Update method

Future<void> Update()
Updates the user configuration by applying local changes to the Exchange server. Calling this method results in a call to EWS.

Implementation

Future<void> Update() async {
  if (_isNew) {
    throw InvalidOperationException(
      "This user configuration can't be updated because it's never been saved.",
    );
  }

  if (_IsPropertyUpdated(UserConfigurationProperties.BinaryData) ||
      _IsPropertyUpdated(UserConfigurationProperties.Dictionary) ||
      _IsPropertyUpdated(UserConfigurationProperties.XmlData)) {
    // service.UpdateUserConfiguration(this)
    UpdateUserConfigurationRequest request = UpdateUserConfigurationRequest(
      _service,
    );
    request.UserConfiguration = this;
    await request.Execute();
  }

  _ResetIsDirty();
}