Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust to a DI structure #40

Merged
merged 3 commits into from
Nov 4, 2022
Merged

Adjust to a DI structure #40

merged 3 commits into from
Nov 4, 2022

Conversation

acupofjose
Copy link
Collaborator

@acupofjose acupofjose commented Oct 30, 2022

Ref to #36 and supabase-community/supabase-csharp#23

  • Creates 3 interfaces: IGotrueApi, IGotrueClient and IGotrueStatelessClient
  • Keeps a large amount of backwards compatibility with previous API
  • Can be instantiated using Microsoft.Extensions.Hosting.Host

Breaking Changes:

  • StatelessClient is no longer a static class but can be used as a transient class (allows for maintaining api via Interface)
  • Client requires calling InstantiateAsync but is no longer a singleton.
  • Several constants that were part of the Client class were moved to Constants for better organization.

Big thanks to HunteRoi for his suggestions!

@acupofjose
Copy link
Collaborator Author

@HunteRoi could you look at this?

Gotrue/Client.cs Outdated Show resolved Hide resolved
Gotrue/Client.cs Outdated Show resolved Hide resolved
# Conflicts:
#	Gotrue/Constants.cs
#	Gotrue/StatelessClient.cs
@acupofjose
Copy link
Collaborator Author

acupofjose commented Nov 3, 2022

@HunteRoi if this looks good to you - this will be the structure I'll be taking to update the other libraries. (Now tracking at supabase-community/supabase-csharp#35)

@HunteRoi
Copy link

HunteRoi commented Nov 3, 2022

Went through it diagonally and it seems good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants