Пример #1
0
        protected CommandMetadata GetOrCreateCommandFor(AdoCommandMessage message)
        {
            CommandMetadata command;
            var connectionId = message.ConnectionId.ToString();
            var commandId = message.CommandId.ToString();

            if (!Metadata.Commands.TryGetValue(commandId, out command))
            {
                command = new CommandMetadata(commandId, connectionId);
                Metadata.Commands.Add(commandId, command);

                var connection = GetOrCreateConnectionFor(message);
                connection.RegiserCommand(command);
            }
            return command;
        }
Пример #2
0
 public void RegiserCommand(CommandMetadata command)
 {
     Commands.Add(command.Id, command);
 }