public static SerializableNavigableItem Dehydrate(INavigableItem item) { return(new SerializableNavigableItem { Glyph = item.Glyph, DisplayTaggedParts = SerializableTaggedText.Dehydrate(item.DisplayTaggedParts), DisplayFileLocation = item.DisplayFileLocation, IsImplicitlyDeclared = item.IsImplicitlyDeclared, Document = SerializableDocumentId.Dehydrate(item.Document), SourceSpan = SerializableTextSpan.Dehydrate(item.SourceSpan), ChildItems = SerializableNavigableItem.Dehydrate(item.ChildItems) }); }
public static SerializableReferenceLocation Dehydrate( ReferenceLocation referenceLocation) { return(new SerializableReferenceLocation { Document = SerializableDocumentId.Dehydrate(referenceLocation.Document), Alias = SerializableSymbolAndProjectId.Dehydrate(referenceLocation.Alias, referenceLocation.Document), Location = SerializableTextSpan.Dehydrate(referenceLocation.Location.SourceSpan), IsImplicit = referenceLocation.IsImplicit, IsWrittenTo = referenceLocation.IsWrittenTo, CandidateReason = referenceLocation.CandidateReason }); }
public Task OnFindInDocumentCompletedAsync(Document document) => _service.Rpc.InvokeAsync(nameof(OnFindInDocumentCompletedAsync), SerializableDocumentId.Dehydrate(document));