コード例 #1
0
        public override INote CreateEmptyNote(IRemoteStorageConnection iconn, IRemoteStorageConfiguration cfg)
        {
            var conn = (StandardNoteConnection)iconn;

            return(new StandardFileNote(Guid.NewGuid(), (StandardNoteConfig)cfg, conn.HConfig)
            {
                ContentVersion = CURRENT_SCHEMA, NoteCreationDate = DateTimeOffset.Now
            });
        }
コード例 #2
0
ファイル: NoteRepository.cs プロジェクト: ustczzh/AlephNote
        public NoteRepository(string path, ISynchronizationFeedback fb, AppSettings cfg, RemoteStorageAccount acc, IAlephDispatcher disp)
        {
            _pathLocalBase   = path;
            _pathLocalFolder = Path.Combine(path, acc.ID.ToString("B"));
            _pathLocalData   = Path.Combine(path, acc.ID.ToString("B") + ".xml");
            _conn            = acc.Plugin.CreateRemoteStorageConnection(cfg.CreateProxy(), acc.Config, cfg.GetHierachicalConfig());
            _account         = acc;
            _appconfig       = cfg;
            _listener        = fb;
            _dispatcher      = disp;
            _thread          = new SynchronizationThread(this, new[] { this, fb }, cfg, _dispatcher);

            _invSaveNotesLocal     = DelayedCombiningInvoker.Create(() => _dispatcher.BeginInvoke(SaveAllDirtyNotes), 10 * 1000, 1 * 60 * 1000);
            _invSaveNotesRemote    = DelayedCombiningInvoker.Create(() => _dispatcher.BeginInvoke(SyncNow), 45 * 1000, 15 * 60 * 1000);
            _invSaveNotesGitBackup = DelayedCombiningInvoker.Create(() => _dispatcher.BeginInvoke(CommitToLocalGitBackup), 10 * 1000, 15 * 60 * 1000);

            _rawFilesystemRepo = new RawFolderRepository(this, disp, cfg);

            _notes.CollectionChanged += NoteCollectionChanged;
        }
コード例 #3
0
ファイル: HeadlessPlugin.cs プロジェクト: vaginessa/AlephNote
 public override INote CreateEmptyNote(IRemoteStorageConnection conn, IRemoteStorageConfiguration cfg)
 {
     return(new HeadlessNote(Guid.NewGuid()));
 }
コード例 #4
0
 public override INote CreateEmptyNote(IRemoteStorageConnection iconn, IRemoteStorageConfiguration cfg)
 {
     return(new FilesystemNote(Guid.NewGuid(), (FilesystemConfig)cfg));
 }
コード例 #5
0
ファイル: EvernotePlugin.cs プロジェクト: ustczzh/AlephNote
        public override INote CreateEmptyNote(IRemoteStorageConnection iconn, IRemoteStorageConfiguration cfg)
        {
            var conn = (EvernoteConnection)iconn;

            return(new EvernoteNote(Guid.NewGuid(), (EvernoteConfig)cfg, conn.HConfig));
        }
コード例 #6
0
 public override INote CreateEmptyNote(IRemoteStorageConnection iconn, IRemoteStorageConfiguration cfg)
 {
     return(new NextcloudNote(-1, Guid.NewGuid(), (NextcloudConfig)cfg));
 }
コード例 #7
0
 public abstract INote CreateEmptyNote(IRemoteStorageConnection conn, IRemoteStorageConfiguration cfg);
コード例 #8
0
        public override INote CreateEmptyNote(IRemoteStorageConnection iconn, IRemoteStorageConfiguration cfg)
        {
            var conn = (SimpleNoteConnection)iconn;

            return(new SimpleNote(Guid.NewGuid().ToString("N").ToUpper(), (SimpleNoteConfig)cfg, conn.HConfig));
        }