/// <summary> /// Get default value(s) for a well-known MSBuild property. /// </summary> /// <param name="propertyName"> /// The property name. /// </param> /// <returns> /// A tuple containing the property's default value / values, or null / null if no defaults are available for it. /// </returns> public static (string defaultValue, IReadOnlyList <string> defaultValues) DefaultsForProperty(string propertyName) { if (String.IsNullOrWhiteSpace(propertyName)) { throw new ArgumentException("Argument cannot be null, empty, or entirely composed of whitespace: 'propertyName'.", nameof(propertyName)); } string helpKey = propertyName; if (PropertyHelp.TryGetValue(helpKey, out Help.PropertyHelp help)) { return(help.DefaultValue, help.DefaultValues); } return(null, null); }
/// <summary> /// Get a help link (if available) for the specified property. /// </summary> /// <param name="propertyName"> /// The property name. /// </param> /// <returns> /// The property help link, or <c>null</c> if no link is available for it. /// </returns> public static string HelpLinkForProperty(string propertyName) { if (String.IsNullOrWhiteSpace(propertyName)) { throw new ArgumentException("Argument cannot be null, empty, or entirely composed of whitespace: 'propertyName'.", nameof(propertyName)); } string helpKey = propertyName; if (PropertyHelp.TryGetValue(helpKey, out PropertyHelp help)) { return(help.HelpLink); } return(null); }
public System.Web.WebPages.HelperResult WriteProperty(Node <Tuple <PropertyHelp, TypeElementContext <PropertyRouteHelpEmbedded> > > node, string entityName) { #line default #line hidden return(new System.Web.WebPages.HelperResult(__razor_helper_writer => { #line 21 "..\..\Help\Views\ViewEntity.cshtml" PropertyHelp ph = node.Value.Item1; using (var ctx = node.Value.Item2) { #line default #line hidden #line 25 "..\..\Help\Views\ViewEntity.cshtml" WriteTo(__razor_helper_writer, Html.HiddenRuntimeInfo(ctx)); #line default #line hidden #line 25 "..\..\Help\Views\ViewEntity.cshtml" #line default #line hidden WriteLiteralTo(__razor_helper_writer, " <dt"); WriteAttributeTo(__razor_helper_writer, "id", Tuple.Create(" id=\"", 685), Tuple.Create("\"", 728) #line 27 "..\..\Help\Views\ViewEntity.cshtml" , Tuple.Create(Tuple.Create("", 690), Tuple.Create <System.Object, System.Int32>(HelpUrls.IdProperty(ph.PropertyRoute) #line default #line hidden , 690), false) ); WriteLiteralTo(__razor_helper_writer, ">"); #line 27 "..\..\Help\Views\ViewEntity.cshtml" WriteTo(__razor_helper_writer, ph.PropertyInfo.NiceName()); #line default #line hidden WriteLiteralTo(__razor_helper_writer, " <code"); WriteLiteralTo(__razor_helper_writer, " class=\'shortcut\'"); WriteLiteralTo(__razor_helper_writer, ">[p:"); #line 27 "..\..\Help\Views\ViewEntity.cshtml" WriteTo(__razor_helper_writer, entityName); #line default #line hidden WriteLiteralTo(__razor_helper_writer, "."); #line 27 "..\..\Help\Views\ViewEntity.cshtml" WriteTo(__razor_helper_writer, ph.PropertyRoute.PropertyString()); #line default #line hidden WriteLiteralTo(__razor_helper_writer, "]</code></dt>\r\n"); WriteLiteralTo(__razor_helper_writer, " <dd>\r\n <span"); WriteLiteralTo(__razor_helper_writer, " class=\"info\""); WriteLiteralTo(__razor_helper_writer, ">\r\n"); WriteLiteralTo(__razor_helper_writer, " "); #line 30 "..\..\Help\Views\ViewEntity.cshtml" WriteTo(__razor_helper_writer, Html.WikiParse(ph.Info, HelpWiki.DefaultWikiSettings)); #line default #line hidden WriteLiteralTo(__razor_helper_writer, "\r\n </span>\r\n"); WriteLiteralTo(__razor_helper_writer, " "); #line 32 "..\..\Help\Views\ViewEntity.cshtml" WriteTo(__razor_helper_writer, Html.Hidden(ctx.SubContextPrefix(a => a.Property), ctx.Value.Property.Path)); #line default #line hidden WriteLiteralTo(__razor_helper_writer, "\r\n"); WriteLiteralTo(__razor_helper_writer, " "); #line 33 "..\..\Help\Views\ViewEntity.cshtml" WriteTo(__razor_helper_writer, Html.TextArea(ctx.SubContextPrefix(a => a.Description), ph.UserDescription, new { @class = "editable" })); #line default #line hidden WriteLiteralTo(__razor_helper_writer, "\r\n <span"); WriteLiteralTo(__razor_helper_writer, " class=\"wiki\""); WriteLiteralTo(__razor_helper_writer, ">"); #line 34 "..\..\Help\Views\ViewEntity.cshtml" WriteTo(__razor_helper_writer, Html.WikiParse(ph.UserDescription, HelpWiki.DefaultWikiSettings)); #line default #line hidden WriteLiteralTo(__razor_helper_writer, "</span>\r\n </dd>\r\n"); #line 36 "..\..\Help\Views\ViewEntity.cshtml" if (node.Children.Count > 0) { #line default #line hidden WriteLiteralTo(__razor_helper_writer, " <h4"); WriteLiteralTo(__razor_helper_writer, " class=\"embedded\""); WriteLiteralTo(__razor_helper_writer, ">"); #line 38 "..\..\Help\Views\ViewEntity.cshtml" WriteTo(__razor_helper_writer, ph.PropertyInfo.NiceName()); #line default #line hidden WriteLiteralTo(__razor_helper_writer, "</h4>\r\n"); WriteLiteralTo(__razor_helper_writer, " <dl"); WriteLiteralTo(__razor_helper_writer, " class=\"embedded\""); WriteLiteralTo(__razor_helper_writer, ">\r\n"); #line 40 "..\..\Help\Views\ViewEntity.cshtml" #line default #line hidden #line 40 "..\..\Help\Views\ViewEntity.cshtml" foreach (var v in node.Children) { #line default #line hidden #line 42 "..\..\Help\Views\ViewEntity.cshtml" WriteTo(__razor_helper_writer, WriteProperty(v, entityName)); #line default #line hidden #line 42 "..\..\Help\Views\ViewEntity.cshtml" ; } #line default #line hidden WriteLiteralTo(__razor_helper_writer, " </dl>\r\n"); #line 45 "..\..\Help\Views\ViewEntity.cshtml" } } #line default #line hidden })); #line 47 "..\..\Help\Views\ViewEntity.cshtml" }