コード例 #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();
 }