AllJoynUnity.AllJoyn.AuthListener.AuthListener C# (CSharp) Method

AuthListener() public method

public AuthListener ( ) : System
return System
            public AuthListener()
            {
                _requestCredentials = new InternalRequestCredentials(this._RequestCredentials);
                _verifyCredentials = new InternalVerifyCredentials(this._VerifyCredentials);
                _securityViolation = new InternalSecurityViolation(this._SecurityViolation);
                _authenticationComplete = new InternalAuthenticationComplete(this._AuthenticationComplete);

                AuthListenerCallbacks callbacks;
                callbacks.requestCredentials = Marshal.GetFunctionPointerForDelegate(_requestCredentials);
                callbacks.verifyCredentials = Marshal.GetFunctionPointerForDelegate(_verifyCredentials);
                callbacks.securityViolation = Marshal.GetFunctionPointerForDelegate(_securityViolation);
                callbacks.authenticationComplete = Marshal.GetFunctionPointerForDelegate(_authenticationComplete);

                GCHandle gch = GCHandle.Alloc(callbacks, GCHandleType.Pinned);
                _authListener = alljoyn_authlistener_create(gch.AddrOfPinnedObject(), IntPtr.Zero);
                gch.Free();
            }