private Event(EventKind kind, string scope, Id <Element> data, IdFactory idFactory) : base(label: "$event", idFactory) { this.Kind = kind switch { EventKind.Begin => "begin", EventKind.End => "end", _ => throw new ArgumentException(nameof(kind)) }; this.Scope = scope; this.Data = data; }
public LsifDocument(Uri uri, string languageId, string?contents, IdFactory idFactory) : base(label: "document", idFactory) { this.Uri = uri; this.LanguageId = languageId; this.Contents = contents; }
public Edge( string label, Id <Vertex> outVertex, Id <Vertex>[] inVertices, IdFactory idFactory ) : base(type: "edge", label: label, idFactory) { OutVertex = outVertex; InVertices = inVertices; }
public static Range FromTextSpan( TextSpan textSpan, SourceText sourceText, IdFactory idFactory ) { var linePositionSpan = sourceText.Lines.GetLinePositionSpan(textSpan); return(new Range( start: ConvertLinePositionToPosition(linePositionSpan.Start), end: ConvertLinePositionToPosition(linePositionSpan.End), idFactory )); }
public static Edge Create <TOutVertex, TInVertex>( string label, Id <TOutVertex> outVertex, Id <TInVertex> inVertex, IdFactory idFactory ) where TOutVertex : Vertex where TInVertex : Vertex { var inVerticesArray = new Id <Vertex> [1]; inVerticesArray[0] = inVertex.As <TInVertex, Vertex>(); return(new Edge(label, outVertex.As <TOutVertex, Vertex>(), inVerticesArray, idFactory)); }
public static Edge Create <TOutVertex, TInVertex>( string label, Id <TOutVertex> outVertex, IList <Id <TInVertex> > inVertices, IdFactory idFactory ) where TOutVertex : Vertex where TInVertex : Vertex { var inVerticesArray = new Id <Vertex> [inVertices.Count]; // Note: this is ultimately just an array copy, but in a strongly-typed way. The JIT might see through this as a memory copy, // but might require some more explicit code if not. for (var i = 0; i < inVertices.Count; i++) { inVerticesArray[i] = inVertices[i].As <TInVertex, Vertex>(); } return(new Edge(label, outVertex.As <TOutVertex, Vertex>(), inVerticesArray, idFactory)); }
public Capabilities( IdFactory idFactory, bool hoverProvider, bool declarationProvider, bool definitionProvider, bool referencesProvider, bool typeDefinitionProvider, bool documentSymbolProvider, bool foldingRangeProvider, bool diagnosticProvider) : base(label: "capabilities", idFactory) { HoverProvider = hoverProvider; DeclarationProvider = declarationProvider; DefinitionProvider = definitionProvider; ReferencesProvider = referencesProvider; TypeDefinitionProvider = typeDefinitionProvider; DocumentSymbolProvider = documentSymbolProvider; FoldingRangeProvider = foldingRangeProvider; DiagnosticProvider = diagnosticProvider; }
public FoldingRangeResult(FoldingRange[] result, IdFactory idFactory) : base(label: "foldingRangeResult", idFactory) { Result = result; }
public Event(EventKind kind, Id <Document> data, IdFactory idFactory) : this(kind, "document", data.As <Document, Element>(), idFactory) { }
public Event(EventKind kind, Id <Project> data, IdFactory idFactory) : this(kind, "project", data.As <Project, Element>(), idFactory) { }
public Range(Position start, Position end, IdFactory idFactory) : base(label: "range", idFactory) { Start = start; End = end; }
public Document(Uri uri, string languageId, IdFactory idFactory) : base(label: "document", idFactory) { this.Uri = uri; this.LanguageId = languageId; }
public Project(string kind, Uri?resource, IdFactory idFactory) : base(label: "project", idFactory) { Kind = kind; Resource = resource; }
public HoverResult(Hover result, IdFactory idFactory) : base(label: "hoverResult", idFactory) { Result = result; }