void StObjConstruct(IActivityMonitor m) { Assert.That(ConstructCount, Is.EqualTo(0), "First StObjConstruct."); SimpleObjectsTrace.LogMethod(GetType().GetMethod("StObjConstruct", BindingFlags.Instance | BindingFlags.NonPublic)); ConstructCount = ConstructCount + 1; m.Info($"This is the setup logger."); }
// Adds monitor parameter otherwise parameter less StObjConstruct are not called. void StObjConstruct(IActivityMonitor m) { Assert.That(ConstructCount, Is.EqualTo(1), "PackageForAB.StObjConstruct has been called."); SimpleObjectsTrace.LogMethod(GetType().GetMethod("StObjConstruct", BindingFlags.Instance | BindingFlags.NonPublic)); ConstructCount = ConstructCount + 1; }
void StObjConstruct([Container] PackageForAB package, IAbstractionA a) { Assert.That(ConstructCount, Is.EqualTo(0), "First construct."); Assert.That(a.ConstructCount, Is.GreaterThanOrEqualTo(1), "At least ObjectA.StObjConstruct have been called."); Assert.That(package.ConstructCount, Is.GreaterThanOrEqualTo(1), "At least PackageForAB.StObjConstruct has been called."); SimpleObjectsTrace.LogMethod(GetType().GetMethod("StObjConstruct", BindingFlags.Instance | BindingFlags.NonPublic)); _a = a; ConstructCount = ConstructCount + 1; }
void StObjConstruct([Container] PackageForABLevel1 package, ObjectBLevel1 oB) { Assert.That(ConstructCount, Is.EqualTo(1), "ObjectA.StObjConstruct has been called."); Assert.That(oB.ConstructCount, Is.GreaterThanOrEqualTo(2), "ObjectB and ObjectBLevel1 StObjConstruct have been called."); Assert.That(package.ConstructCount, Is.GreaterThanOrEqualTo(2), "PackageForAB and PackageForABLevel1 StObjConstruct have been called."); SimpleObjectsTrace.LogMethod(GetType().GetMethod("StObjConstruct", BindingFlags.Instance | BindingFlags.NonPublic)); _oB = oB; ConstructCount = ConstructCount + 1; }
public virtual void MethofOfALevel3() { SimpleObjectsTrace.LogMethod(GetType().GetMethod("MethofOfALevel3", BindingFlags.Instance | BindingFlags.Public)); }
// Adds monitor parameter otherwise parameter less StObjConstruct are not called. void StObjConstruct(IActivityMonitor m) { Assert.That(ConstructCount, Is.EqualTo(3), "ObjectA, ObjectALevel1 and ObjectALevel2 construct have been called."); SimpleObjectsTrace.LogMethod(GetType().GetMethod("StObjConstruct", BindingFlags.Instance | BindingFlags.NonPublic)); ConstructCount = ConstructCount + 1; }
public void MethofOfA() { SimpleObjectsTrace.LogMethod(GetType().GetMethod("MethofOfA", BindingFlags.Instance | BindingFlags.Public)); }
// Adds an optional parameter otherwise parameter less StObjConstruct are not called. void StObjConstruct(IAmNotHere?opt = null) { Assert.That(ConstructCount, Is.EqualTo(0), "First construct."); SimpleObjectsTrace.LogMethod(GetType().GetMethod("StObjConstruct", BindingFlags.Instance | BindingFlags.NonPublic)); ConstructCount = ConstructCount + 1; }