/// <summary> /// <para>Creates new VKontakte comments widget.</para> /// </summary> /// <param name="html">Helper object to call method on.</param> /// <param name="builder">Delegate that performs configuration of the widget.</param> /// <returns>HTML contents of configured and rendered widget.</returns> /// <exception cref="ArgumentNullException">If either <paramref name="html"/> or <paramref name="builder"/> is a <c>null</c> reference.</exception> /// <seealso cref="IVkontakteHtmlHelper.Comments()"/> public static string Comments(this IVkontakteHtmlHelper html, Action<IVkontakteCommentsWidget> builder) { Assertion.NotNull(html); Assertion.NotNull(builder); var widget = html.Comments(); builder(widget); return widget.ToHtmlString(); }
public static string Logo(this Assembly assembly) { if (_logo == null) { var assemblycomments = assembly.Comments(); assemblycomments = string.IsNullOrEmpty(assemblycomments) ? string.Empty : "\r\n" + assemblycomments; _logo = @"{0} {1} Version {2} for {3} {4}. All rights reserved{5} -------------------------------------------------------------------------------".format(assembly.Company(), assembly.Title(), assembly.Version(), IntPtr.Size == 8 ? "x64" : "x86", assembly.Copyright().Replace("©", "(c)"), assemblycomments); } return _logo; }