public void ResolveTest() { RegisterTest(); // The instance is Test. var test = AutofacUtility.Resolve<ITest>(); Assert.IsNotNull(test); test.DoTest(); }
void Start() { var debugA = AutofacUtility.Resolve <IDebugA>(); debugA.DebugLog("Test Resolve IDebugA."); var debugB = AutofacUtility.Resolve <IDebugB>(); debugB.DebugWarning("Test Resolve IDebugB."); var debugC0 = AutofacUtility.ResolveKeyed <IDebugC>("C0"); debugC0.DebugError("Test Resolve IDebugC C0."); var debugC1 = AutofacUtility.ResolveKeyed <IDebugC>("C1"); debugC1.DebugError("Test Resolve IDebugC C1."); }