Skip to content

Instantly share code, notes, and snippets.

@PulkitSethi1984
Created April 29, 2018 11:09
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 PulkitSethi1984/bb683e8de6b9004160a7e02e43bc0d26 to your computer and use it in GitHub Desktop.
Save PulkitSethi1984/bb683e8de6b9004160a7e02e43bc0d26 to your computer and use it in GitHub Desktop.
public void RegisterServices()
{
var builder = new ContainerBuilder();
#if AUTOMATION
builder.RegisterType<MockNetworkService>.As<INetworkService>().SingleInstance();
#else
builder.RegisterInstance<NetworkService>.As<INetworkService>().SingleInstance();
#endif
// Register other services
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment