Esempio n. 1
0
        static public UdbusConnector CreateHelloed(IUdbusTransport transport, uint serial, out string name, HelloRecvDelegate helloRecv)
        {
            UdbusConnector connectorCreate = CreateAuthorised(transport);

            // We won't bother to raise an exception since Hello() should do it for us.
            int helloResult = connectorCreate.HelloSend(serial, out name, helloRecv);

            return(connectorCreate);
        }
Esempio n. 2
0
        /// Factory functions
        static public UdbusConnector CreateAuthorised(IUdbusTransport transport)
        {
            UdbusConnector connectorCreate = new UdbusConnector(transport);

            int authoriseResult = connectorCreate.Authorise();

            if (authoriseResult != 0) // If error occurred
            {
                throw Exceptions.UdbusAuthorisationException.CreateWithErrorCode();
            } // Ends if error occurred

            return(connectorCreate);
        }
Esempio n. 3
0
        /// Factory functions
        public static UdbusConnector CreateAuthorised(IUdbusTransport transport)
        {
            UdbusConnector connectorCreate = new UdbusConnector(transport);

            int authoriseResult = connectorCreate.Authorise();

            if (authoriseResult != 0) // If error occurred
            {
                throw Exceptions.UdbusAuthorisationException.CreateWithErrorCode();

            } // Ends if error occurred

            return connectorCreate;
        }