Skip to content

Instantly share code, notes, and snippets.

@xximjasonxx
Created November 23, 2020 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xximjasonxx/e70780ca91b564258431d728621cc3ef to your computer and use it in GitHub Desktop.
Save xximjasonxx/e70780ca91b564258431d728621cc3ef to your computer and use it in GitHub Desktop.
public class ContextServiceFactory
{
private ContextService _currentContext;
public ContextService GetCurrentContext()
{
if (_currentContext == null)
_currentContext = new ContextService();
return _currentContext;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment