public DirectoryInfo GetAppDataDirectory(IApplicationNameProvider appNameProvider) { return(new DirectoryInfo(Path.Combine(GetRootDataDirectory().FullName, AppDataDirectory, appNameProvider.GetApplicationName()))); }
public string GetClientId(IApplicationNameProvider nameProvider) { return(GetClientId(nameProvider.GetApplicationName())); }
public override string GetApplicationClientId(IApplicationNameProvider nameProvider) { return("InvalidClientId_".RandomLetters(8)); }
public override string GetApplicationClientId(IApplicationNameProvider nameProvider) { return(ClientId); }
public TextFileLogger(IApplicationNameProvider applicationNameProvider) : this() { ApplicationNameProvider = applicationNameProvider; }
public ApiKeyResolver(IApiKeyProvider apiKeyProvider, IApplicationNameProvider nameProvider) : this() { ApiKeyProvider = apiKeyProvider; ApplicationNameProvider = nameProvider; }
public string GetApplicationClientId(IApplicationNameProvider nameProvider) { return(ApiKeyProvider.GetApplicationClientId(nameProvider)); }
public DirectoryInfo GetAppWorkspaceDirectory(IApplicationNameProvider appNameProvider, string workspaceName, string hash) { return(new DirectoryInfo(Path.Combine(GetAppDataDirectory(appNameProvider).FullName, WorkspacesDirectory, workspaceName, hash))); }
public DirectoryInfo GetAppEmailTemplatesDirectory(IApplicationNameProvider appNameProvider) { return(GetAppDataDirectory(appNameProvider, EmailTemplatesDirectory)); }
public DirectoryInfo GetAppFilesDirectory(IApplicationNameProvider appNameProvider) { return(GetAppDataDirectory(appNameProvider, FilesDirectory)); }
public DirectoryInfo GetAppWorkspaceDirectory(IApplicationNameProvider appNameProvider, Type type) { string hash = type.ToInfoHash(); return(GetAppWorkspaceDirectory(appNameProvider, type.Name, hash)); }
public DirectoryInfo GetAppRepositoryWorkspaceDirectory(IApplicationNameProvider appNameProvider) { return(GetAppDataDirectory(appNameProvider, WorkspacesDirectory)); }
public DirectoryInfo GetAppRepositoryDirectory(IApplicationNameProvider appNameProvider, string subDirectory) { return(new DirectoryInfo(Path.Combine(GetAppDataDirectory(appNameProvider).FullName, subDirectory))); }
public DirectoryInfo GetAppDataDirectory(IApplicationNameProvider appNameProvider, string directoryName) { return(new DirectoryInfo(Path.Combine(GetAppDataDirectory(appNameProvider).FullName, directoryName))); }
public override string GetApplicationClientId(IApplicationNameProvider nameProvider) { return(DefaultConfiguration.GetAppSetting("ClientId", true)); }
public override SQLiteDatabase GetAppDatabaseFor(IApplicationNameProvider appNameProvider, object instance) { return(GetDatabaseFor(instance.GetType(), () => GetAppDatabaseDirectory(appNameProvider).FullName)); }
public static ServiceRegistryService GetLocalServiceRegistryService(DataSettings dataSettings, IApplicationNameProvider appNameProvider, string assemblySearchPattern, ILogger logger = null) { logger = logger ?? Log.Default; DaoRepository repo = dataSettings.GetSysDaoRepository(logger, nameof(FileService)); FileService fileService = new FileService(repo); AssemblyServiceRepository assRepo = new AssemblyServiceRepository(); assRepo.Database = dataSettings.GetSysDatabaseFor(assRepo); assRepo.EnsureDaoAssemblyAndSchema(); AssemblyService assemblyService = new AssemblyService(DataSettings.Current, fileService, assRepo, appNameProvider); ServiceRegistryRepository serviceRegistryRepo = new ServiceRegistryRepository(); serviceRegistryRepo.Database = dataSettings.GetSysDatabaseFor(serviceRegistryRepo); serviceRegistryRepo.EnsureDaoAssemblyAndSchema(); ServiceRegistryService serviceRegistryService = new ServiceRegistryService( fileService, assemblyService, serviceRegistryRepo, dataSettings.GetSysDaoRepository(logger), new AppConf { Name = appNameProvider.GetApplicationName() } ) { AssemblySearchPattern = assemblySearchPattern }; return(serviceRegistryService); }
public override SQLiteDatabase GetAppDatabaseFor(IApplicationNameProvider appNameProvider, Type objectType, string info = null) { return(GetDatabaseFor(objectType, () => GetAppDatabaseDirectory(appNameProvider).FullName, info)); }
public ApiKeyInfo GetApiKeyInfo(IApplicationNameProvider nameProvider) { return(ApiKeyProvider.GetApiKeyInfo(nameProvider)); }
/// <summary> /// Get the path to the application specific SQLite database file for the specified type /// </summary> /// <param name="appNameProvider"></param> /// <param name="type"></param> /// <param name="info"></param> /// <returns></returns> public override string GetAppDatabasePathFor(IApplicationNameProvider appNameProvider, Type type, string info = null) { return(GetAppDatabaseFor(appNameProvider, type, info).DatabaseFile.FullName); }
public abstract string GetApplicationClientId(IApplicationNameProvider nameProvider);
public override SQLiteDatabase GetAppDatabase(IApplicationNameProvider appNameProvider, string databaseName) { return(new SQLiteDatabase(GetAppDatabaseDirectory(appNameProvider).FullName, databaseName)); }
public string GetApplicationClientId(IApplicationNameProvider nameProvider) { CoreServices.ApplicationRegistration.Data.Application app = ApplicationRegistrationRepository.OneApplicationWhere(c => c.Name == nameProvider.GetApplicationName()); return(app?.Cuid); }
public void SetRuntimeAppDataDirectory(IApplicationNameProvider appNameProvider) { RuntimeSettings.AppDataFolder = GetAppDataDirectory(appNameProvider).FullName; }
public ConfigurationServiceCredentialProvider(string coreConfigurationServerHost, IApplicationNameProvider appNameProvider, int port = 80, ILogger logger = null) { SettingSource = SettingSource.DefaultConfigurationFile; ConfigurationServerHost = coreConfigurationServerHost; ConfigurationServerPort = port; Logger = logger ?? Log.Default; ApplicationNameProvider = appNameProvider; _passwordRetrievers = new Dictionary <SettingSource, Func <string> >() { { SettingSource.Invalid, () => throw new InvalidOperationException() },
public AssemblyService(DataSettings dataSettings, IFileService fileService, Repo.AssemblyServiceRepository repo, IApplicationNameProvider appNameProvider) { DataSettings = dataSettings; FileService = fileService; AssemblyManagementRepository = repo; ApplicationNameProvider = appNameProvider; LoadCurrentRuntimeDescriptorTask = RegisterCurrentRuntimeDescriptor(); }
} // to enable auto proxy gen public CoreUserRegistryService(IDatabaseProvider dbProvider, IUserManager wrapped, IApplicationNameProvider appNameProvider, IUserResolver userResolver, IRoleResolver roleResolver) { DatabaseProvider = dbProvider; UserManager = wrapped; ApplicationNameProvider = appNameProvider; UserResolver = userResolver; RoleResolver = roleResolver; dbProvider.SetDatabases(this); dbProvider.SetDatabases(UserManager); dbProvider.SetDatabases(ApplicationNameProvider); WireUserManagementEvents(); }
public ApiKeyInfo(IApplicationNameProvider nameProvider) { ApplicationNameProvider = nameProvider; }
public AssemblyService(IFileService fileService, Repo.AssemblyServiceRepository repo, IApplicationNameProvider appNameProvider) { FileService = fileService; AssemblyManagementRepository = repo; ApplicationNameProvider = appNameProvider; LoadCurrentRuntimeDescriptorTask = LoadCurrentRuntimeDescriptor(); }
public DirectoryInfo GetAppAssemblyDirectory(IApplicationNameProvider appNameProvider) { return(GetAppDataDirectory(appNameProvider, AssemblyDirectory)); }