예제 #1
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
     });
 }
예제 #2
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)
     });
 }