public IItem FromDocumentToItem(CoreDocument document) { var book = new Book(); book.Title = document.GetString("title"); book.Authors = document.GetString("authors"); book.Id = int.Parse(document.GetString("id")); book.Formats.AddRange(document.GetStringList("format")); return(book); }
public IItem FromDocumentToItem(CoreDocument document) { var page = new OneNotePage() { Id = document.GetString("id"), Name = document.GetString("name"), SectionNodePath = document.GetString("sectionnodepath"), SectionName = document.GetString("sectionname") }; return(page); }
public IItem FromDocumentToItem(CoreDocument document) { var fullname = document.GetString("fullname"); var export = Items.SingleOrDefault(c => c.GetType().FullName == fullname); if (export == null) { throw new InvalidOperationException(string.Format("Missing Command {0}", fullname)); } return(DocumentFromClass(export)); }
public IItem FromDocumentToItem(CoreDocument document) { return(new FileInfoItem(new FileInfo(document.GetString("filepath")))); }
public IItem FromDocumentToItem(CoreDocument document) { var name = document.GetString("id"); return(new ServiceTypedItem(ServiceController.GetServices().Single(s => s.ServiceName == name))); }
public IItem FromDocumentToItem(CoreDocument document) { var id = int.Parse(document.GetString("id")); return(new ProcessItem(Process.GetProcessById(id))); }
public IItem FromDocumentToItem(CoreDocument document) { return(new TextItem(document.GetString("id"))); }
public IItem FromDocumentToItem(CoreDocument document) { return(Repository.FromFileName(document.GetString("filename"))); }