public ServiceLocator(Autofac.IComponentContext context) { Contract.AssertNotNull(() => context, context); m_context = context; m_busToken = Messaging.Bus.Instance.ListenFor(this); }
public ResolverImpl(AF.IComponentContext iocContext) { if (iocContext == null) { throw new NotImplementedException("IOC Component Context is null"); } _iocContext = iocContext; }
public static object SafeResolve(this Autofac.IComponentContext context, Type serviceType) { object o; if (context.TryResolve(serviceType, out o)) { return(o); } else { return(null); } }
/// <summary> /// Construct the configurator for a hierarchy /// </summary> /// <param name="hierarchy">The hierarchy to build.</param> /// <remarks> /// <para> /// Initializes a new instance of the <see cref="XmlHierarchyConfigurator" /> class /// with the specified <see cref="Hierarchy" />. /// </para> /// </remarks> public XmlHierarchyConfigurator(Autofac.IComponentContext context, Hierarchy hierarchy) { m_context = context; m_hierarchy = hierarchy; m_appenderBag = new Hashtable(); }
public MainWindow(Autofac.IComponentContext context) { _context = context; InitializeComponent(); }