private void CheckMembers(TypeNode type) { foreach (Member member in type.Members) { if (member is Method) { var method = (Method)member; var fragmentSignature = GetFragmentSignatureFromConfiguration(type, method); if (!FragmentUtility.IsFragmentGenerator(method) && (fragmentSignature == null || !fragmentSignature.IsGenerator)) { Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); Parse(method); stopwatch.Stop(); _methodProfilingResults.Add(method.FullName, stopwatch.Elapsed); } } } }
public void IsFragmentGenerator_CustomFragmentGenerator_True() { Method sampleMethod = TestHelper.GetSample <FragmentUtilitySample>("CustomFragmentGenerator"); Assert.That(FragmentUtility.IsFragmentGenerator(sampleMethod), Is.True); }
public void IsFragmentGenerator_ReturnFragment_False() { Method sampleMethod = TestHelper.GetSample <FragmentUtilitySample>("ReturnFragment"); Assert.That(FragmentUtility.IsFragmentGenerator(sampleMethod), Is.False); }