Пример #1
0
        internal static void OnLogout(IntPtr address)
        {
            OnLogoutCallback   callback     = null;
            LogoutCallbackInfo callbackInfo = null;

            if (Helper.TryGetAndRemoveCallback <OnLogoutCallback, LogoutCallbackInfoInternal, LogoutCallbackInfo>(address, out callback, out callbackInfo))
            {
                callback(callbackInfo);
            }
        }
Пример #2
0
        /// <summary>
        /// Signs the player out of the online service.
        /// </summary>
        /// <param name="options">structure containing information about which account to log out.</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 logout operation completes, either successfully or in error</param>
        public void Logout(LogoutOptions options, object clientData, OnLogoutCallback completionDelegate)
        {
            var optionsInternal = Helper.CopyProperties <LogoutOptionsInternal>(options);

            var completionDelegateInternal = new OnLogoutCallbackInternal(OnLogout);
            var clientDataAddress          = IntPtr.Zero;

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

            EOS_Auth_Logout(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
            Helper.TryMarshalDispose(ref optionsInternal);
        }
        /// <summary>
        /// Signs the player out of the online service.
        /// </summary>
        /// <param name="options">structure containing information about which account to log out.</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 logout operation completes, either successfully or in error</param>
        public void Logout(LogoutOptions options, object clientData, OnLogoutCallback completionDelegate)
        {
            System.IntPtr optionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <LogoutOptionsInternal, LogoutOptions>(ref optionsAddress, options);

            var clientDataAddress = System.IntPtr.Zero;

            var completionDelegateInternal = new OnLogoutCallbackInternal(OnLogoutCallbackInternalImplementation);

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

            EOS_Auth_Logout(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);

            Helper.TryMarshalDispose(ref optionsAddress);
        }