internal AspectRelation(AspectRelationType relationType, string @ref) { if (@ref == null) { throw new ArgumentNullException(nameof(@ref)); } RelationType = relationType; Ref = @ref; }
internal static AspectRelation DeserializeAspectRelation(JsonElement element) { AspectRelationType relationType = default; string @ref = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("relationType")) { relationType = new AspectRelationType(property.Value.GetString()); continue; } if (property.NameEquals("ref")) { @ref = property.Value.GetString(); continue; } } return(new AspectRelation(relationType, @ref)); }