public static bool onPortExecutableExecute(OS self,
                                                   ref Rectangle dest,
                                                   ref string name,
                                                   ref string data,
                                                   ref int port,
                                                   ref string[] args,
                                                   ref string originalName)
        {
            var portExecutableExecuteEvent =
                new Event.ExecutablePortExecuteEvent(self, dest, name, data, port, args);
            var exceptions = portExecutableExecuteEvent.CallEvent();

            if (exceptions.Count > 0)
            {
                foreach (var pair in exceptions)
                {
                    self.WriteLine("PortHack Listener Method '{0}' failed with: {1}", pair.Key, pair.Value);
                }
            }
            name = portExecutableExecuteEvent.ExecutableName;
            data = portExecutableExecuteEvent.ExecutableData;
            if (portExecutableExecuteEvent.IsCancelled)
            {
                return(true);
            }
            return(false);
        }
Exemple #2
0
        public static bool onPortExecutableExecute(OS self,
                                                   ref Rectangle dest,
                                                   ref string name,
                                                   ref string data,
                                                   ref int port,
                                                   ref string[] args,
                                                   ref string originalName)
        {
            var portExecutableExecuteEvent =
                new Event.ExecutablePortExecuteEvent(self, dest, name, data, port, args);

            portExecutableExecuteEvent.CallEvent();
            name = portExecutableExecuteEvent.ExecutableName;
            data = portExecutableExecuteEvent.ExecutableData;
            if (portExecutableExecuteEvent.IsCancelled)
            {
                return(true);
            }
            return(false);
        }