Beispiel #1
0
 private static XRefSpec GetExternalReference(ExternalReferencePackageCollection externalReferences, string uid)
 {
     if (!externalReferences.TryGetReference(uid, out ReferenceViewModel vm))
     {
         return(null);
     }
     return(YamlUtility.ConvertTo <XRefSpec>(vm));
 }
Beispiel #2
0
        private static XRefSpec GetExternalReference(ExternalReferencePackageCollection externalReferences, string uid)
        {
            ReferenceViewModel vm;

            if (!externalReferences.TryGetReference(uid, out vm))
            {
                return(null);
            }
            using (var sw = new StringWriter())
            {
                YamlUtility.Serialize(sw, vm);
                using (var sr = new StringReader(sw.ToString()))
                {
                    return(YamlUtility.Deserialize <XRefSpec>(sr));
                }
            }
        }
Beispiel #3
0
 private static XRefSpec GetExternalReference(ExternalReferencePackageCollection externalReferences, string uid)
 {
     ReferenceViewModel vm;
     if (!externalReferences.TryGetReference(uid, out vm))
     {
         return null;
     }
     return YamlUtility.ConvertTo<XRefSpec>(vm);
 }
 private static XRefSpec GetExternalReference(ExternalReferencePackageCollection externalReferences, string uid)
 {
     ReferenceViewModel vm;
     if (!externalReferences.TryGetReference(uid, out vm))
     {
         return null;
     }
     using (var sw = new StringWriter())
     {
         YamlUtility.Serialize(sw, vm);
         using (var sr = new StringReader(sw.ToString()))
         {
             return YamlUtility.Deserialize<XRefSpec>(sr);
         }
     }
 }