private LibraryStub ReadOneLibrary(ref UnifiedJsonReader reader) { string hash = null; string type = null; bool serviceable = false; string path = null; string hashPath = null; string runtimeStoreManifestName = null; reader.ReadStartObject(); while (reader.Read() && reader.IsTokenTypeProperty()) { switch (reader.GetStringValue()) { case DependencyContextStrings.Sha512PropertyName: hash = reader.ReadAsString(); break; case DependencyContextStrings.TypePropertyName: type = reader.ReadAsString(); break; case DependencyContextStrings.ServiceablePropertyName: serviceable = reader.ReadAsBoolean(defaultValue: false); break; case DependencyContextStrings.PathPropertyName: path = reader.ReadAsString(); break; case DependencyContextStrings.HashPathPropertyName: hashPath = reader.ReadAsString(); break; case DependencyContextStrings.RuntimeStoreManifestPropertyName: runtimeStoreManifestName = reader.ReadAsString(); break; default: reader.Skip(); break; } } reader.CheckEndObject(); return(new LibraryStub() { Hash = hash, Type = Pool(type), Serviceable = serviceable, Path = path, HashPath = hashPath, RuntimeStoreManifestName = runtimeStoreManifestName }); }