コード例 #1
0
        public async void OnReceiveSecuritiesAPI(object sender, SendSecuritiesAPI e)
        {
            switch (e.Convey)
            {
            case Message message when Clients is IHubCallerClients:
                await SendMessage(message);

                return;

            case Catalog.Strategics.Options options when Clients is IHubCallerClients:
                await SendMessage(options);

                return;

            case Tuple <char, string> condition:
                switch (condition.Item1)
                {
                case 'I' when condition.Item2.Split(';') is string[] insert && int.TryParse(insert[0], out int append):
                    if (append > 9)
                    {
                        if (Security.Conditions[append].Add(insert[^ 1]) && Clients is IHubCallerClients)
                        {
                            await SendMessage(new Message
                            {
                                Key    = condition.Item1.ToString(),
                                Convey = insert[^ 1]