コード例 #1
0
 public SequencePointStub(DocumentStub document,
                          bool isHidden = true,
                          int offset    = 0,
                          int startLine = SequencePoint.HiddenLine,
                          int endLine   = SequencePoint.HiddenLine,
                          int startCol  = 0,
                          int endCol    = 0)
 {
     Document    = document;
     StartLine   = startLine;
     EndLine     = endLine;
     StartColumn = startCol;
     EndColumn   = endCol;
     IsHidden    = isHidden;
     Offset      = offset;
 }
コード例 #2
0
 public MethodDebugInformationStub(string name, DocumentStub document, List <SequencePointStub> sequencePoints = null)
 {
     Name           = name;
     Document       = document;
     SequencePoints = sequencePoints ?? new List <SequencePointStub>();
 }
コード例 #3
0
        public static Dictionary <string, MethodDebugInformationStub> GetExpectedForTestMethodDebugInformation(string testName)
        {
            string       method1;
            string       method2;
            DocumentStub document1;
            DocumentStub document2;

            switch (testName)
            {
            case "TestMethodDebugInformation_unix.il":
                method1   = ".ctor";
                method2   = "Pow";
                document1 = new DocumentStub("/tmp/TestMethodDebugInformation/SimpleMath.cs");
                document2 = new DocumentStub("/tmp/TestMethodDebugInformation/SimpleMathMethods.cs");
                break;

            case "TestMethodDebugInformation_win.il":
                method1   = ".ctor";
                method2   = "Pow";
                document1 = new DocumentStub("C:\\tmp\\TestMethodDebugInformation\\SimpleMath.cs");
                document2 = new DocumentStub("C:\\tmp\\TestMethodDebugInformation\\SimpleMathMethods.cs");
                break;

            default:
                Assert.False(true);
                return(null);
            }

            return(new Dictionary <string, MethodDebugInformationStub>()
            {
                {
                    method1,
                    new MethodDebugInformationStub(method1, document1,
                                                   new List <SequencePointStub>()
                    {
                        new SequencePointStub(document1, false, 0x0, 6, 6, 9, 37),
                        new SequencePointStub(document1, false, 0x7, 7, 7, 9, 10),
                        new SequencePointStub(document1, false, 0x8, 8, 8, 13, 28),
                        new SequencePointStub(document1, false, 0xf, 9, 9, 9, 10),
                    })
                },
                {
                    method2,
                    new MethodDebugInformationStub(method2, document2,
                                                   new List <SequencePointStub>()
                    {
                        new SequencePointStub(document2, false, 0x0, 6, 6, 9, 10),
                        new SequencePointStub(document2, false, 0x1, 7, 7, 13, 23),
                        new SequencePointStub(document2, false, 0x3, 8, 8, 13, 23),
                        new SequencePointStub(document2, false, 0x5, 9, 9, 13, 25),
                        new SequencePointStub(document2, false, 0x7, 10, 10, 18, 23),
                        new SequencePointStub(document2, true, 0x9),
                        new SequencePointStub(document2, false, 0xb, 11, 11, 13, 14),
                        new SequencePointStub(document2, false, 0xc, 12, 12, 17, 26),
                        new SequencePointStub(document2, false, 0x10, 13, 13, 17, 21),
                        new SequencePointStub(document2, false, 0x14, 14, 14, 13, 14),
                        new SequencePointStub(document2, false, 0x15, 10, 10, 32, 35),
                        new SequencePointStub(document2, false, 0x19, 10, 10, 25, 30),
                        new SequencePointStub(document2, true, 0x1e),
                        new SequencePointStub(document2, false, 0x21, 15, 15, 13, 24),
                        new SequencePointStub(document2, false, 0x26, 16, 16, 9, 10),
                    })
                }
            });
        }