Example #1
0
        private CommandMetadata GetOrCreateCommandFor(AdomdCommandMessage 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.RegisterCommand(command);
            }

            return(command);
        }
 /// <summary>
 /// Registers a command.
 /// </summary>
 /// <param name="command">The command itself.</param>
 public void RegisterCommand(CommandMetadata command)
 {
     Commands.Add(command.Id, command);
 }
        private CommandMetadata GetOrCreateCommandFor(AdomdCommandMessage 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.RegisterCommand(command);
            }

            return command;
        }
Example #4
0
 /// <summary>
 /// Registers a command.
 /// </summary>
 /// <param name="command">The command itself.</param>
 public void RegisterCommand(CommandMetadata command)
 {
     Commands.Add(command.Id, command);
 }