ADL.ConnectionLostEvent.FromNative C# (CSharp) Method

FromNative() static private method

static private FromNative ( ADLConnectionLostEvent connLostEvnt ) : ConnectionLostEvent
connLostEvnt ADLConnectionLostEvent
return ConnectionLostEvent
        internal static ConnectionLostEvent FromNative(
            ADLConnectionLostEvent connLostEvnt)
        {
            ConnectionLostEvent result = new ConnectionLostEvent();
            result._scopeId = connLostEvnt.scopeId.body;
            result._errCode = connLostEvnt.errCode;
            result._errMessage = connLostEvnt.errMessage.body;
            result._willReconnect = connLostEvnt.willReconnect;
            return result;
        }

Usage Example

Example #1
0
 private void on_connection_lost_callback_t(IntPtr opaque,
                                            ref ADLConnectionLostEvent e)
 {
     try
     {
         if (_listener != null)
         {
             _listener.onConnectionLost(
                 ConnectionLostEvent.FromNative(e));
         }
     }
     catch (Exception)
     {
     }
 }
ConnectionLostEvent