public void Set(UpdateModOptions other) { if (other != null) { m_ApiVersion = ModsInterface.UpdatemodApiLatest; LocalUserId = other.LocalUserId; Mod = other.Mod; } }
/// <summary> /// Starts an asynchronous task that makes a request to update the specified mod to the latest version. /// the section related to mods in eos_result.h for more details. /// </summary> /// <param name="options">structure containing the game and mod identifiers</param> /// <param name="clientData">arbitrary data that is passed back to you in the CompletionDelegate</param> /// <param name="completionDelegate">a callback that is fired when the async operation completes, either successfully or in error. If the mod is up to date then the operation will complete with success.</param> public void UpdateMod(UpdateModOptions options, object clientData, OnUpdateModCallback completionDelegate) { System.IntPtr optionsAddress = new System.IntPtr(); Helper.TryMarshalSet <UpdateModOptionsInternal, UpdateModOptions>(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnUpdateModCallbackInternal(OnUpdateModCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); EOS_Mods_UpdateMod(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsAddress); }