Exemple #1
0
 public LiveEntry(JToken node) : base(node)
 {
     if (node["offlineMessage"] != null)
     {
         this._OfflineMessage = node["offlineMessage"].Value <string>();
     }
     if (node["recordStatus"] != null)
     {
         this._RecordStatus = (RecordStatus)ParseEnum(typeof(RecordStatus), node["recordStatus"].Value <string>());
     }
     if (node["dvrStatus"] != null)
     {
         this._DvrStatus = (DVRStatus)ParseEnum(typeof(DVRStatus), node["dvrStatus"].Value <string>());
     }
     if (node["dvrWindow"] != null)
     {
         this._DvrWindow = ParseInt(node["dvrWindow"].Value <string>());
     }
     if (node["lastElapsedRecordingTime"] != null)
     {
         this._LastElapsedRecordingTime = ParseInt(node["lastElapsedRecordingTime"].Value <string>());
     }
     if (node["liveStreamConfigurations"] != null)
     {
         this._LiveStreamConfigurations = new List <LiveStreamConfiguration>();
         foreach (var arrayNode in node["liveStreamConfigurations"].Children())
         {
             this._LiveStreamConfigurations.Add(ObjectFactory.Create <LiveStreamConfiguration>(arrayNode));
         }
     }
     if (node["recordedEntryId"] != null)
     {
         this._RecordedEntryId = node["recordedEntryId"].Value <string>();
     }
     if (node["pushPublishEnabled"] != null)
     {
         this._PushPublishEnabled = (LivePublishStatus)ParseEnum(typeof(LivePublishStatus), node["pushPublishEnabled"].Value <string>());
     }
     if (node["publishConfigurations"] != null)
     {
         this._PublishConfigurations = new List <LiveStreamPushPublishConfiguration>();
         foreach (var arrayNode in node["publishConfigurations"].Children())
         {
             this._PublishConfigurations.Add(ObjectFactory.Create <LiveStreamPushPublishConfiguration>(arrayNode));
         }
     }
     if (node["firstBroadcast"] != null)
     {
         this._FirstBroadcast = ParseInt(node["firstBroadcast"].Value <string>());
     }
     if (node["lastBroadcast"] != null)
     {
         this._LastBroadcast = ParseInt(node["lastBroadcast"].Value <string>());
     }
     if (node["currentBroadcastStartTime"] != null)
     {
         this._CurrentBroadcastStartTime = ParseFloat(node["currentBroadcastStartTime"].Value <string>());
     }
     if (node["recordingOptions"] != null)
     {
         this._RecordingOptions = ObjectFactory.Create <LiveEntryRecordingOptions>(node["recordingOptions"]);
     }
     if (node["liveStatus"] != null)
     {
         this._LiveStatus = (EntryServerNodeStatus)ParseEnum(typeof(EntryServerNodeStatus), node["liveStatus"].Value <string>());
     }
     if (node["segmentDuration"] != null)
     {
         this._SegmentDuration = ParseInt(node["segmentDuration"].Value <string>());
     }
     if (node["explicitLive"] != null)
     {
         this._ExplicitLive = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["explicitLive"].Value <string>());
     }
     if (node["viewMode"] != null)
     {
         this._ViewMode = (ViewMode)ParseEnum(typeof(ViewMode), node["viewMode"].Value <string>());
     }
     if (node["recordingStatus"] != null)
     {
         this._RecordingStatus = (RecordingStatus)ParseEnum(typeof(RecordingStatus), node["recordingStatus"].Value <string>());
     }
     if (node["lastBroadcastEndTime"] != null)
     {
         this._LastBroadcastEndTime = ParseInt(node["lastBroadcastEndTime"].Value <string>());
     }
     if (node["broadcastTime"] != null)
     {
         this._BroadcastTime = ParseInt(node["broadcastTime"].Value <string>());
     }
 }
Exemple #2
0
        public LiveEntry(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "offlineMessage":
                    this._OfflineMessage = propertyNode.InnerText;
                    continue;

                case "recordStatus":
                    this._RecordStatus = (RecordStatus)ParseEnum(typeof(RecordStatus), propertyNode.InnerText);
                    continue;

                case "dvrStatus":
                    this._DvrStatus = (DVRStatus)ParseEnum(typeof(DVRStatus), propertyNode.InnerText);
                    continue;

                case "dvrWindow":
                    this._DvrWindow = ParseInt(propertyNode.InnerText);
                    continue;

                case "lastElapsedRecordingTime":
                    this._LastElapsedRecordingTime = ParseInt(propertyNode.InnerText);
                    continue;

                case "liveStreamConfigurations":
                    this._LiveStreamConfigurations = new List <LiveStreamConfiguration>();
                    foreach (XmlElement arrayNode in propertyNode.ChildNodes)
                    {
                        this._LiveStreamConfigurations.Add(ObjectFactory.Create <LiveStreamConfiguration>(arrayNode));
                    }
                    continue;

                case "recordedEntryId":
                    this._RecordedEntryId = propertyNode.InnerText;
                    continue;

                case "pushPublishEnabled":
                    this._PushPublishEnabled = (LivePublishStatus)ParseEnum(typeof(LivePublishStatus), propertyNode.InnerText);
                    continue;

                case "publishConfigurations":
                    this._PublishConfigurations = new List <LiveStreamPushPublishConfiguration>();
                    foreach (XmlElement arrayNode in propertyNode.ChildNodes)
                    {
                        this._PublishConfigurations.Add(ObjectFactory.Create <LiveStreamPushPublishConfiguration>(arrayNode));
                    }
                    continue;

                case "firstBroadcast":
                    this._FirstBroadcast = ParseInt(propertyNode.InnerText);
                    continue;

                case "lastBroadcast":
                    this._LastBroadcast = ParseInt(propertyNode.InnerText);
                    continue;

                case "currentBroadcastStartTime":
                    this._CurrentBroadcastStartTime = ParseFloat(propertyNode.InnerText);
                    continue;

                case "recordingOptions":
                    this._RecordingOptions = ObjectFactory.Create <LiveEntryRecordingOptions>(propertyNode);
                    continue;

                case "liveStatus":
                    this._LiveStatus = (EntryServerNodeStatus)ParseEnum(typeof(EntryServerNodeStatus), propertyNode.InnerText);
                    continue;

                case "segmentDuration":
                    this._SegmentDuration = ParseInt(propertyNode.InnerText);
                    continue;

                case "explicitLive":
                    this._ExplicitLive = (NullableBoolean)ParseEnum(typeof(NullableBoolean), propertyNode.InnerText);
                    continue;

                case "viewMode":
                    this._ViewMode = (ViewMode)ParseEnum(typeof(ViewMode), propertyNode.InnerText);
                    continue;

                case "recordingStatus":
                    this._RecordingStatus = (RecordingStatus)ParseEnum(typeof(RecordingStatus), propertyNode.InnerText);
                    continue;

                case "lastBroadcastEndTime":
                    this._LastBroadcastEndTime = ParseInt(propertyNode.InnerText);
                    continue;
                }
            }
        }