public void CanDetermineCallContext() { CallStackAnalyzer.CalledBy(0, out var fullyQualifiedClassName, out var isStatic, out var constructor); Assert.IsFalse(isStatic); Assert.IsFalse(constructor); Assert.AreEqual(typeof(CallStackAnalyzerTest).Namespace + '.' + nameof(CanDetermineCallContext), fullyQualifiedClassName); var testObject = new CallStackAnalyzerTestObject(); Assert.IsNotNull(testObject); Assert.IsTrue(CallStackAnalyzerTestObject.Constructor); Assert.IsFalse(CallStackAnalyzerTestObject.IsStatic); Assert.AreEqual(typeof(CallStackAnalyzerTest).Namespace + "..ctor", CallStackAnalyzerTestObject.FullyQualifiedMethodName); CallStackAnalyzerTestObject.RegisterTypes(); Assert.IsFalse(CallStackAnalyzerTestObject.Constructor); Assert.IsTrue(CallStackAnalyzerTestObject.IsStatic); Assert.AreEqual(typeof(CallStackAnalyzerTest).Namespace + '.' + nameof(CallStackAnalyzerTestObject.RegisterTypes), CallStackAnalyzerTestObject.FullyQualifiedMethodName); }
internal static void RegisterTypes() { CallStackAnalyzer.CalledBy(0, out FullyQualifiedMethodName, out IsStatic, out Constructor); }
internal CallStackAnalyzerTestObject() { CallStackAnalyzer.CalledBy(0, out FullyQualifiedMethodName, out IsStatic, out Constructor); }