Ejemplo n.º 1
0
 public void Load()
 {
     if( File.Exists( _path ) == false )
         return;
     using( TextReader textReader = File.OpenText( _path ) )
     using( JsonReader reader = new JsonReader( textReader ) )
     {
         PrimaryStore store = ( PrimaryStore )_serializer.Deserialize( reader, typeof( PrimaryStore ) );
         this.Breakpoints = store.Breakpoints;
         this.CodeTags = store.CodeTags;
         this.Bookmarks = store.Bookmarks;
     }
 }
Ejemplo n.º 2
0
        public static int LoadNetscapeStyleBookmarkFile(string path)
        {
            Console.WriteLine("Start DataProcessor Main");

            var reader      = new BookmarksManager.NetscapeBookmarksReader();
            var inputStream = new System.IO.FileStream(
                path: path,
                mode: System.IO.FileMode.Open
                );

            BookmarksManager.BookmarkFolder readerResult = reader.Read(inputStream);
            int recordsLoaded = readerResult.Count;

            BookmarkStore.SaveBookmarkItemsForUser <IBookmarkItem>(bookmarkItems: readerResult, username: "******");

            Console.WriteLine("End DataProcessor Main.");

            return(recordsLoaded);
        }