public static bool FixOrValidateInputRel( string rel, bool isRssEncl, out SFRel Rel, out string relOther) { relOther = null; if (isRssEncl) { Rel = SFRel.enclosure; } else { Rel = SFRel.none; rel = rel.NullIfEmptyTrimmed(); if (rel != null) { if (SFRelTypesX.RelsDictionary.TryGetValue(rel, out SFRel _rl)) { Rel = _rl; } else { relOther = rel; } } } return(true); }
public void Link1( string inUrl, string finUrl, string inMimeTypeStr, BasicMimeType inMimeType, BasicMimeType finMimeType, string inRel, bool inIsRssEncl, SFRel finRel) { var lk = new SFLink(inUrl, inMimeTypeStr, inRel, isRssEncl: inIsRssEncl, mimeType: inMimeType); True(lk.MimeType == finMimeType); True(lk.Rel == finRel); True(lk.Url == (finUrl.NullIfEmpty() ?? inUrl)); }
public static string ToStringFast(this SFRel rel) { return(SFRelTypesX.RelsDictionaryReverse[rel]); }
public static bool IsNotEnclosureOrSelf(this SFRel rel) { return(rel != SFRel.enclosure && rel != SFRel.self); }