Exemplo n.º 1
0
        /// <summary>
        /// Login/Authenticate given a valid set of external auth credentials.
        /// </summary>
        /// <param name="options">structure containing the external account credentials and type to use during the login operation</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 login operation completes, either successfully or in error</param>
        public void Login(LoginOptions options, object clientData, OnLoginCallback completionDelegate)
        {
            var optionsInternal = Helper.CopyProperties <LoginOptionsInternal>(options);

            var completionDelegateInternal = new OnLoginCallbackInternal(OnLogin);
            var clientDataAddress          = IntPtr.Zero;

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

            EOS_Connect_Login(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
            Helper.TryMarshalDispose(ref optionsInternal);
        }
Exemplo n.º 2
0
        public void Login(IOSLoginOptions options, object clientData, OnLoginCallback completionDelegate)
        {
            System.IntPtr optionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <IOSLoginOptionsInternal, IOSLoginOptions>(ref optionsAddress, options);

            var clientDataAddress = System.IntPtr.Zero;

            var completionDelegateInternal = new OnLoginCallbackInternal(OnLoginCallbackInternalImplementation);

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

            EOS_Auth_Login(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);

            Helper.TryMarshalDispose(ref optionsAddress);
        }
Exemplo n.º 3
0
 private static extern void EOS_Connect_Login(IntPtr handle, ref LoginOptionsInternal options, IntPtr clientData, OnLoginCallbackInternal completionDelegate);
 internal static extern void EOS_Auth_Login(System.IntPtr handle, System.IntPtr options, System.IntPtr clientData, OnLoginCallbackInternal completionDelegate);