Exemplo n.º 1
0
        public static object Route(string endpointName, NetCoreEventArgs e)
        {
            try
            {
                var endpoint = getEndpoint(endpointName);
                if (endpoint == null)
                {
                    var defaultEndpoint = getEndpoint("DEFAULT");
                    if (defaultEndpoint != null)
                    {
                        e.message.Type = endpointName + "|" + e.message.Type;
                        return(defaultEndpoint.OnMessageReceived(null, e));
                    }
                }
                return(endpoint.OnMessageReceived(null, e));
            }
            catch (Exception ex)
            {
                if (CloudDebug.ShowErrorDialog(ex) == DialogResult.Abort)
                {
                    throw new RTCV.NetCore.AbortEverythingException();
                }

                return(null);
            }
        }
Exemplo n.º 2
0
        public static object Route(string endpointName, NetCoreEventArgs e)
        {
            try
            {
                var endpoint = getEndpoint(endpointName);
                if (endpoint == null)
                {
                    var defaultEndpoint = getEndpoint("DEFAULT");
                    if (defaultEndpoint != null)
                    {
                        e.message.Type = endpointName + "|" + e.message.Type;
                        return(defaultEndpoint.OnMessageReceived(null, e));
                    }
                }
                return(endpoint.OnMessageReceived(null, e));
            }
            catch (Exception ex)
            {
                string additionalInfo = "Error trapped from LocalRouter\n\n";

                var ex2 = new CustomException(ex.Message, additionalInfo + ex.StackTrace);

                if (CloudDebug.ShowErrorDialog(ex2) == DialogResult.Abort)
                {
                    throw new RTCV.NetCore.AbortEverythingException();
                }

                return(null);
            }
        }