private RdfFormat(RdfFormat copyOf, Encoding withEncoding) { DefaultExtension = copyOf.DefaultExtension; TripleFormatterType = copyOf.TripleFormatterType; Encoding = withEncoding; MediaTypes = copyOf.MediaTypes; SerializedModel = copyOf.SerializedModel; }
/// <summary> /// Returns true, if this instance has at least one media type string that matches /// one of the media type strings of <paramref name="other"/> /// </summary> /// <param name="other"></param> /// <returns></returns> public bool MatchesMediaType(RdfFormat other) { return MediaTypes.Any(x => other.MediaTypes.Contains(x)); }
/// <summary> /// Returns true, if this instance has at least one media type string that matches /// one of the media type strings of <paramref name="other"/> /// </summary> /// <param name="other"></param> /// <returns></returns> public bool MatchesMediaType(RdfFormat other) { return(this.MediaTypes.Any(x => other.MediaTypes.Contains(x))); }