/// <summary> /// Returns true if document is in specified relationship with selected document. /// </summary> /// <param name="parameters"> /// Document to be checked; /// Relationship side; /// Relationship name; /// Alias path of selected document; /// </param> public static object IsInRelationship(params object[] parameters) { switch (parameters.Length) { case 5: return(ContentFunctions.IsInRelationship(parameters[0], ValidationHelper.GetString(parameters[1], null), ValidationHelper.GetString(parameters[2], null), ValidationHelper.GetString(parameters[3], null), ValidationHelper.GetString(parameters[4], null))); default: throw new NotSupportedException(); } }
/// <summary> /// Returns true if document is in one/all of the selected categories. /// </summary> /// <param name="parameters"> /// Document to be checked; /// Category names separated with a semicolon; /// Indicator whether all the selected categories should be required. /// </param> public static object IsInCategories(params object[] parameters) { switch (parameters.Length) { case 2: return(ContentFunctions.IsInCategories(parameters[0], ValidationHelper.GetString(parameters[1], null), false)); case 3: return(ContentFunctions.IsInCategories(parameters[0], ValidationHelper.GetString(parameters[1], null), ValidationHelper.GetBoolean(parameters[2], false))); default: throw new NotSupportedException(); } }