Skip to content

Instantly share code, notes, and snippets.

@samueleresca
Last active March 28, 2020 17:59
Show Gist options
  • Save samueleresca/2f068c5ba284291785915ee641ce4d5e to your computer and use it in GitHub Desktop.
Save samueleresca/2f068c5ba284291785915ee641ce4d5e to your computer and use it in GitHub Desktop.
public class ThreadUnsafeClass
{
public OtherClass MyObject;
public void ThreadUnsafeClass()
{
MyObject = new OtherClass();
MyObject.InitializeDependencies();
}
public void Handler(string value)
{
MyObject.Execute(value);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment