Ejemplo n.º 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);
        }
Ejemplo n.º 2
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;
        }