public IEnumerable <StreamlabsOBSItem> GetSceneItems(StreamlabsOBSClient client = null) { List <StreamlabsOBSItem> result = new List <StreamlabsOBSItem>(); foreach (JToken item in Nodes) { ESceneNodeType type = item["sceneNodeType"].ToObject <ESceneNodeType>(); if ((type == ESceneNodeType.FOLDER) && (client != null)) { StreamlabsOBSFolder folder = item.ToObject <StreamlabsOBSFolder>(); result.AddRange(folder.GetNestedItems(client)); } else { if (type == ESceneNodeType.ITEM) { result.Add(item.ToObject <StreamlabsOBSItem>()); } } } return(result); }
public SceneCollectionsService(StreamlabsOBSClient client) { this.client = client; }
public SceneCollectionsService() { client = new StreamlabsOBSClient(); }
public ScenesService([NotNull] StreamlabsOBSClient client, [NotNull] SceneCollectionsService collectionsService) { this.client = client ?? throw new ArgumentNullException(nameof(client)); this.collectionsService = collectionsService ?? throw new ArgumentNullException(nameof(collectionsService)); }