public bool Equals(JsonApiResourceIdentifier r) { if (r == null) { return false; } return Type.Equals(r.Type) && Id.Equals(r.Id); }
public bool Equals(JsonApiResourceIdentifier r) { if (r == null) { return(false); } return(Type.Equals(r.Type) && Id.Equals(r.Id)); }
public JsonApiResource(string type, string id) { Id = id; Type = type; ResourceIdentifier = new JsonApiResourceIdentifier(type, id); }
private JsonApiResource GetIncludedResourceByIdentifier(JsonApiResourceIdentifier resourceIdentifier) { var includedResource = _document.GetIncludedResourceByIdentifier(resourceIdentifier); if (includedResource == null) { throw new JsonApiFormatException(string.Format("No included resource found for identifier: {0}", resourceIdentifier)); } return includedResource; }
// note this glosses over some format issues, like if there are multiple included resources with the same identifier public JsonApiResource GetIncludedResourceByIdentifier(JsonApiResourceIdentifier id) { return Included.FirstOrDefault(jsonApiResource => jsonApiResource.ResourceIdentifier.Equals(id)); }
public JsonApiResource(string type, string id) { Id = id; Type = type; ResourceIdentifier = new JsonApiResourceIdentifier(type, id); }
// note this glosses over some format issues, like if there are multiple included resources with the same identifier public JsonApiResource GetIncludedResourceByIdentifier(JsonApiResourceIdentifier id) { return(Included.FirstOrDefault(jsonApiResource => jsonApiResource.ResourceIdentifier.Equals(id))); }