Exemplo n.º 1
0
        private Method ProcessMethod(MethodDefinition method, FileReference fileReference)
        {
            var coverageMethod = new Method();

            coverageMethod.FullName      = method.FullName;
            coverageMethod.IsConstructor = method.IsConstructor;
            coverageMethod.IsStatic      = method.IsStatic;
            coverageMethod.IsSetter      = method.IsSetter;
            coverageMethod.IsGetter      = method.IsGetter;
            coverageMethod.MetadataToken = method.MetadataToken.ToInt32();

            if (method.DebugInformation.HasSequencePoints)
            {
                coverageMethod.AddSequencePoints(GetSequencePoints(method, fileReference));
                coverageMethod.AddBranchPoints(GetBranchPoints(method, fileReference));
            }

            return(coverageMethod);
        }