コード例 #1
0
 public void Set(EnumerateModsOptions other)
 {
     if (other != null)
     {
         m_ApiVersion = ModsInterface.EnumeratemodsApiLatest;
         LocalUserId  = other.LocalUserId;
         Type         = other.Type;
     }
 }
コード例 #2
0
        /// <summary>
        /// Starts an asynchronous task that makes a request to enumerate mods for the specified game.
        /// Types of the mods to enumerate can be specified through <see cref="EnumerateModsOptions" />
        /// the section related to mods in eos_result.h for more details.
        /// </summary>
        /// <param name="options">structure containing the game 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</param>
        public void EnumerateMods(EnumerateModsOptions options, object clientData, OnEnumerateModsCallback completionDelegate)
        {
            System.IntPtr optionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <EnumerateModsOptionsInternal, EnumerateModsOptions>(ref optionsAddress, options);

            var clientDataAddress = System.IntPtr.Zero;

            var completionDelegateInternal = new OnEnumerateModsCallbackInternal(OnEnumerateModsCallbackInternalImplementation);

            Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);

            EOS_Mods_EnumerateMods(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);

            Helper.TryMarshalDispose(ref optionsAddress);
        }