Example #1
0
        public void ViewCategory(string categoryPath, long revision = -1)
        {
            var category       = this.GetCategory(categoryPath);
            var authentication = this.CommandContext.GetAuthentication(this);
            var dataSet        = category.Dispatcher.Invoke(() => category.GetDataSet(authentication, revision));

            foreach (var item in dataSet.Tables)
            {
                ViewProperties.View(item, this.Out);
            }
        }
Example #2
0
        protected override Task OnExecuteAsync(CancellationToken cancellationToken)
        {
            var domain    = this.Content.Domain;
            var tableName = this.Content.Dispatcher.Invoke(() => this.Content.Table.Name);

            return(this.Content.Dispatcher.InvokeAsync(() =>
            {
                var dataSet = domain.Source as CremaDataSet;
                var dataTable = dataSet.Tables[tableName];
                ViewProperties.View(dataTable, this.CommandContext.Out);
            }));
        }
Example #3
0
        public void View(string tableName, long revision = -1)
        {
            var table          = this.GetTable(tableName);
            var authentication = this.CommandContext.GetAuthentication(this);
            var dataTable      = table.Dispatcher.Invoke(() =>
            {
                var dataSet = (table.Parent ?? table).GetDataSet(authentication, revision);
                return(dataSet.Tables[table.Name, table.Category.Path]);
            });

            ViewProperties.View(dataTable, this.Out);
        }
Example #4
0
        protected override void OnExecute()
        {
            var domain    = this.Content.Dispatcher.Invoke(() => this.Content.Domain);
            var tableName = this.Content.Dispatcher.Invoke(() => this.Content.Table.Name);

            this.Content.Dispatcher.Invoke(() =>
            {
                var dataSet   = domain.Source as CremaDataSet;
                var dataTable = dataSet.Tables[tableName];
                ViewProperties.View(dataTable, this.Out);
            });
        }