예제 #1
0
            public IEnumerable <Link> Link(int taskId)
            {
                var prev = DB.Tasks.Where(x => x.Id < taskId).Select(x => x.Id).DefaultIfEmpty().Max();
                var next = DB.Tasks.Where(x => x.Id > taskId).Select(x => x.Id).DefaultIfEmpty().Min();

                if (prev > 0)
                {
                    yield return(Links.Link <TaskPaper>(prev).SetTitle("Anterior"));
                }
                if (next > 0)
                {
                    yield return(Links.Link <TaskPaper>(next).SetTitle("Próximo"));
                }
            }
예제 #2
0
 public IEnumerable <Link> Link(Task task)
 {
     yield return(Links.Link($"http://www.google.com?q={task.Name}").SetTitle("Google Search"));
 }
예제 #3
0
 public IEnumerable <Link> Link()
 {
     yield return(Links.Link <TasksPaper>().SetTitle("Tarefas"));
 }
예제 #4
0
            public IEnumerable <IFormatter> Format(Task[] tasks)
            {
                yield return(Links.Link("http://www.google.com").SetTitle("Google Search"));

                yield return(Tables.MakeTable(tasks));
            }