public void OpenFile(string path, Guid collectionId, IEnumerable <SearchTag> searchTags) { var args = new ImoutoViewerArgs( collectionId, GetDto(searchTags).ToArray()); var base64Args = Base64Serializer.Serialize(args); try { var myProcess = new Process { StartInfo = { FileName = Associations.AssocQueryString(Associations.AssocStr.ASSOCSTR_EXECUTABLE, "." + path.Split('.').Last()), Arguments = path + $" -nav-search={base64Args}" } }; myProcess.Start(); } catch { Process.Start(path); } }
/// <summary> /// Creates a IReadOnlyList QueryableEdge object /// </summary> /// <returns>List of QueryableEdge</returns> private IReadOnlyList <QueryableEdge <T> > GetSelectedEdges() { var list = new List <QueryableEdge <T> >(); List <T> edges = GetEdgesToReturn(_source, _pageDetails); for (int i = 0; i < edges.Count; i++) { int index = i; _properties[_position] = index; string cursor = Base64Serializer.Serialize(_properties); list.Add(new QueryableEdge <T>(cursor, edges[i], index)); } return(list); }
private string Act(object obj) { return(_sut.Serialize(obj)); }
private static string SerializeCursor(int offSet) => Base64Serializer.Serialize(new Cursor { OffSet = offSet });