示例#1
0
        public ServiceLocator(Autofac.IComponentContext context)
        {
            Contract.AssertNotNull(() => context, context);

            m_context = context;

            m_busToken = Messaging.Bus.Instance.ListenFor(this);
        }
示例#2
0
 public ResolverImpl(AF.IComponentContext iocContext)
 {
     if (iocContext == null)
     {
         throw new NotImplementedException("IOC Component Context is null");
     }
     _iocContext = iocContext;
 }
示例#3
0
        public static object SafeResolve(this Autofac.IComponentContext context, Type serviceType)
        {
            object o;

            if (context.TryResolve(serviceType, out o))
            {
                return(o);
            }
            else
            {
                return(null);
            }
        }
示例#4
0
 /// <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();
 }
示例#5
0
 public MainWindow(Autofac.IComponentContext context)
 {
     _context = context;
     InitializeComponent();
 }