Skip to content

Improve multiple project support #39

Description

@PeterIttner

At the moment there is really only one project integration supported.

With one instance of ICalingaService you can only access one calinga project, because it has its configured API token and project settings.

You could for sure instantiate multiple ICalingaService-instances with different backing configurations, when creating them by hand. But this raises the question how to deal with dependency injection and .AddSingleton() as mentioned in the documentation for ASP.NET core integration.

It would be helpful, when either the documentation would be updated for supporting multiple project or the .NET SDK itself would have a way of supporting different project-configurations at runtime.

Sth like:

var projectA = calinga.Team("Team A").Project("Project A")
  .WithAPIToken("***")
  .WithDrafts(true)
  .WithCacheInterval(30);

var translatedA = await projectA.GetTranslationsAsync("my-key");

// and for supporting current appsettings-configuration:

var projectB = calinga.Team("Team A").Project("Project B")
  .WithConfiguration(nameof(CalingaServiceSettings));

var translatedB = await projectB.GetTranslationsAsync("my-key");

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions