/// <summary> /// Determines whether the specified <see cref="T:System.Object" /> is equal to this instance. /// </summary> /// <param name="obj">The <see cref="T:System.Object" /> to compare with this instance.</param> /// <returns> /// <b>true</b>, if the specified <see cref="T:System.Object" /> is equal to this instance; otherwise, <b>false</b>. /// </returns> public override bool Equals(object obj) { HtmlSample other = obj as HtmlSample; return(other != null && Html == other.Html); }
/// <summary> /// Sets the HTML sample for a specified route value combination. /// </summary> /// <param name="config">The <see cref="HttpConfiguration"/>.</param> /// <param name="sample">The sample containing the HTML.</param> /// <param name="controllerName">Name of the controller.</param> /// <param name="actionName">Name of the action.</param> /// <param name="parameterNames">The parameter names.</param> public static void SetHtmlSample(this HttpConfiguration config, HtmlSample sample, string controllerName, string actionName, params string[] parameterNames) { config.GetHelpPageSampleGenerator().HtmlSamples.Add(new KeyValuePair <HelpPageSampleKey, HtmlSample>( new HelpPageSampleKey(controllerName, actionName, parameterNames), sample)); }