Skip to content

Instantly share code, notes, and snippets.

@rahulsahay19
Created February 27, 2017 13:01
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 rahulsahay19/13ff9f0e59add7b24ebe794e2789aa4d to your computer and use it in GitHub Desktop.
Save rahulsahay19/13ff9f0e59add7b24ebe794e2789aa4d to your computer and use it in GitHub Desktop.
RegisterTypes
public static void RegisterTypes(IUnityContainer container)
{
// NOTE: To load from web.config uncomment the line below. Make sure to add a Microsoft.Practices.Unity.Configuration to the using statements.
//container.LoadConfiguration();
// TODO: Register your types here
/*Working Piece inline*/
container.RegisterType<IMovieServiceAsync>(
new TransientLifetimeManager(),
new InjectionFactory(
(c) => new ChannelFactory<IMovieServiceAsync>("IMovieService").CreateChannel()));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment