Example #1
0
    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);
        }
    }
Example #2
0
        /// <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);
        }
Example #3
0
 private string Act(object obj)
 {
     return(_sut.Serialize(obj));
 }
Example #4
0
 private static string SerializeCursor(int offSet) => Base64Serializer.Serialize(new Cursor {
     OffSet = offSet
 });