protected virtual string GetValue(PlaylistItem playlistItem)
        {
            var runner = new PlaylistItemScriptRunner(this.ScriptingContext, playlistItem, this.Script);

            runner.Prepare();
            return(Convert.ToString(runner.Run()));
        }
Exemplo n.º 2
0
        private object ExecuteScript(PlaylistItem playlistItem, string script)
        {
            var runner = new PlaylistItemScriptRunner(this.PlaybackManager, this.ScriptingContext, playlistItem, script);

            runner.Prepare();
            return(runner.Run());
        }
Exemplo n.º 3
0
                public override object GroupNameFromItem(object item, int level, CultureInfo culture)
                {
                    var playlistItem = item as PlaylistItem;

                    if (playlistItem != null)
                    {
                        var runner = new PlaylistItemScriptRunner(this.ScriptingContext, playlistItem, this.Script);
                        runner.Prepare();
                        return(runner.Run());
                    }
                    return(item);
                }
Exemplo n.º 4
0
        protected virtual Task Refresh()
        {
            var outputStream = this.PlaybackManager.CurrentStream;
            var runner       = new PlaylistItemScriptRunner(
                this.ScriptingContext,
                outputStream != null ? outputStream.PlaylistItem : null,
                this.Script
                );

            runner.Prepare();
            var value = Convert.ToString(runner.Run());

            return(Windows.Invoke(() => this.SetWindowTitle(value)));
        }
Exemplo n.º 5
0
        public int Compare(PlaylistItem playlistItem1, PlaylistItem playlistItem2)
        {
            var value1 = default(string);
            var value2 = default(string);

            {
                var runner = new PlaylistItemScriptRunner(this.ScriptingContext, playlistItem1, this.Script);
                runner.Prepare();
                value1 = Convert.ToString(runner.Run());
            }
            {
                var runner = new PlaylistItemScriptRunner(this.ScriptingContext, playlistItem2, this.Script);
                runner.Prepare();
                value2 = Convert.ToString(runner.Run());
            }
            return(this.Compare(value1, value2));
        }