private bool AreSame(ObjectJsonObject l, ObjectJsonObject r) { return(l.Properties.Count() == r.Properties.Count() && l .Properties .OrderBy((p) => p.Name) .Zip(r .Properties .OrderBy((p) => p.Name), (lp, rp) => lp.Name.Equals(rp.Name) && lp.Value.Equals(rp.Value)) .All((arg) => arg)); }
/// <summary> /// JSONノードを構築します. /// </summary> public IJsonObject Build() { return(ObjectJsonObject.Of(propsDict.Select((e) => new JsonProperty(e.Key, e.Value)))); }