Ejemplo n.º 1
0
 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)
     });
 }
Ejemplo n.º 2
0
 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));