コード例 #1
0
        public override string GetResponseText(ref string address)
        {
            var function = MultiTypeResponse.GetFunction(address);

            switch (function)
            {
            case nameof(XmlFunction.TableData):
                return(GetTableText(address));

            case nameof(JsonFunction.Triggers):
                if (json.Length == 1)
                {
                    jsonIndex = 0;
                }
                else
                {
                    jsonIndex++;
                }

                return(new NotificationTriggerJsonResponse(json[jsonIndex]).GetResponseText(ref address));

            case nameof(HtmlFunction.ObjectData):
                return(GetObjectDataResponse(address).GetResponseText(ref address));

            case nameof(HtmlFunction.ChannelEdit):
                return(new ChannelResponse().GetResponseText(ref address));

            default:
                throw new NotImplementedException($"Unknown function '{function}' passed to {nameof(NotificationTriggerResponse)}");
            }
        }
コード例 #2
0
        public string GetResponseText(ref string address)
        {
            var function = MultiTypeResponse.GetFunction(address);

            switch (function)
            {
            case nameof(JsonFunction.TableData):
                return(GetSystemInfo(address));

            default:
                throw new NotImplementedException();
            }
        }
コード例 #3
0
        public override string GetResponseText(ref string address)
        {
            var function = MultiTypeResponse.GetFunction(address);

            switch (function)
            {
            case nameof(XmlFunction.TableData):
                return(GetTableText(address));

            case nameof(HtmlFunction.ChannelEdit):
                return(new ChannelResponse(channels).GetResponseText(ref address));

            case nameof(HtmlFunction.EditNotification):
            case nameof(HtmlFunction.ObjectData):
                return(GetObjectDataResponse(address).GetResponseText(ref address));

            default:
                throw new NotImplementedException($"Unknown function '{function}' passed to {nameof(NotificationTriggerResponse)}");
            }
        }