public static bool IsEmpty(this Resources.WebId webId) { return (webId.IsDefaultOrNull() || ( String.IsNullOrWhiteSpace(webId.Key) && webId.UUID.IsDefaultOrEmpty() && webId.URN.IsDefault() && webId.Source.IsDefault() )); }
public static TResult GetUUID <TResult>(this Resources.WebId webId, Func <Guid, TResult> success, Func <TResult> isEmpty) { if (webId.IsEmpty()) { return(isEmpty()); } if (webId.UUID.IsDefaultOrEmpty()) { return(isEmpty()); } return(success(webId.UUID)); }
public static Guid?ToGuid(this Resources.WebId webId) { if (default(WebId) == webId) { return(default(Guid?)); } if (webId.IsEmpty()) { return(default(Guid)); } if (webId.UUID.IsDefaultOrEmpty()) { return(default(Guid)); } return(webId.UUID); }