Пример #1
0
        public DatabaseBackend(string database_path, CredentialsVerifier auth = null)
        {
            if (auth == null)
                oauthHandler = new OAuthDatabaseHandler (DbAuthenticator);
            else
                oauthHandler = new OAuthDatabaseHandler (auth);

            DbConfig.CreateSchema ();
        }
Пример #2
0
        public RainyFileSystemBackend(string data_path, CredentialsVerifier auth, bool reset = false)
        {
            oauthHandler = new OAuthDatabaseHandler (auth);

            // TODO move this into the oauth stuff
            DbConfig.CreateSchema ();

            this.notesBasePath = Path.Combine (data_path, "notes");
            if (!Directory.Exists (notesBasePath)) {
                Directory.CreateDirectory (notesBasePath);
            }
        }
Пример #3
0
        public RainyStandaloneServer(IDataBackend backend, string listen_url)
        {
            ListenUrl = listen_url;
            logger = LogManager.GetLogger (this.GetType ());

            OAuth = backend.OAuth;

            DataBackend = backend;
        }