コード例 #1
0
        public static ExternalInputInfo FromJson(string json)
        {
            var jobj = JsonObject.Parse(json);
            var ei = new ExternalInputInfo
            {
                Id = jobj.GetNamedString("id", ""),
                Name = jobj.GetNamedString("name", ""),
                Connected = jobj.GetNamedBoolean("connected", false),
                IconUrl = jobj.GetNamedString("icon", ""),
                RawData = jobj
            };

            return ei;
        }
コード例 #2
0
 public void SetExternalInput(ExternalInputInfo input, ResponseListener pListener)
 {
     // Do nothing - not Supported
     Util.PostError(pListener, ServiceCommandError.NotSupported());
 }
コード例 #3
0
        public void SetExternalInput(ExternalInputInfo input, ResponseListener listener)
        {
            const string uri = "ssap://tv/switchInput";

            var payload = new JsonObject();

            try
            {
                if (input != null && input.Id != null)
                {
                    payload.Add("inputId", JsonValue.CreateStringValue(input.Id));
                }
                else
                {
                    Logger.Current.AddMessage("ExternalInputInfo has no id");
                }
            }
            catch (Exception)
            {

            }

            var request = new ServiceCommand(this, uri, payload, listener);
            request.Send();
        }
 private void SetExternalInput(ExternalInputInfo externalInputInfo)
 {
     externalInputControl.SetExternalInput(externalInputInfo, null);
 }
コード例 #5
0
 protected bool Equals(ExternalInputInfo other)
 {
     return string.Equals(Id, other.Id) && string.Equals(Name, other.Name) && Connected.Equals(other.Connected) && string.Equals(IconUrl, other.IconUrl) && Equals(RawData, other.RawData);
 }