Beispiel #1
0
        public void SimpleTest(string expected)
        {
            var model  = new DocumentHighlightKind();
            var result = Fixture.SerializeObject(model);

            result.Should().Be(expected);

            var deresult = new Serializer(ClientVersion.Lsp3).DeserializeObject <DocumentHighlightKind>(expected);

            deresult.Should().BeEquivalentTo(model);
        }
        public void SimpleTest(string expected)
        {
            var model  = new DocumentHighlightKind();
            var result = Fixture.SerializeObject(model);

            result.Should().Be(expected);

            var deresult = JsonConvert.DeserializeObject <DocumentHighlightKind>(expected);

            deresult.ShouldBeEquivalentTo(model);
        }
Beispiel #3
0
        private HighlightSpanKind ToHighlightSpanKind(DocumentHighlightKind kind)
        {
            switch (kind)
            {
            case DocumentHighlightKind.Text:
                return(HighlightSpanKind.Definition);

            case DocumentHighlightKind.Read:
                return(HighlightSpanKind.Reference);

            case DocumentHighlightKind.Write:
                return(HighlightSpanKind.WrittenReference);

            default:
                return(HighlightSpanKind.None);
            }
        }
 /// <summary>
 /// Create a DocumentHighlight object.
 /// @param range The range the highlight applies to.
 /// </summary>
 public DocumentHighlight(Range range, DocumentHighlightKind kind)
 {
     this.range = range;
     this.kind = kind;
 }
 public DocumentHighlight(Range range, DocumentHighlightKind kind)
 {
     Range = range;
     Kind  = kind;
 }
Beispiel #6
0
 /// <summary>
 /// Create a DocumentHighlight object.
 /// @param range The range the highlight applies to.
 /// </summary>
 public DocumentHighlight(Range range, DocumentHighlightKind kind)
 {
     this.range = range;
     this.kind  = kind;
 }