示例#1
0
        /// <summary>
        /// Returns true, if expected command has been sent by client.
        /// </summary>
        public static bool Request <T>(AppJson appJson, CommandEnum command, out CommandJson commandJson, out T componentJson) where T : ComponentJson
        {
            bool result = false;

            commandJson   = appJson.RequestJson.CommandGet();
            componentJson = (T)null;
            if (command == commandJson.CommandEnum)
            {
                result        = true;
                componentJson = (T)appJson.Root.RootComponentJsonList[commandJson.ComponentId];
            }
            return(result);
        }
示例#2
0
 public static Result Process(CommandJson command)
 {
     PostgreSQLAdapter.command = command;
     return(Connect());
 }
 public static Result Process(CommandJson command)
 {
     FirebirdAdapter.command = command;
     return(Connect());
 }
示例#4
0
        private async Task HandleMessage(CommandJson data)
        {
            var handler = _handlers[data.CommandName];

            await handler(new StringReader(data.Command));
        }
示例#5
0
 public static Result Process(CommandJson command)
 {
     OracleAdapter.command = command;
     return(Connect());
 }