Ejemplo n.º 1
0
 /// <summary>
 /// Gets the correct platform template file path.
 /// </summary>
 /// <param name="platform">The platform of the requested template.</param>
 /// <param name="configuration">The configuration of the requested template.</param>
 /// <returns>The absolute file path for the platform template to use.</returns>
 public string GetTemplateFilePathForPlatform(string platform, string configuration)
 {
     if (PlatformTemplates.TryGetValue($"{platform}.{configuration}.Template.props.template", out string templatePath) ||
         PlatformTemplates.TryGetValue($"{platform}.Configuration.Template.props.template", out templatePath))
     {
         return(templatePath);
     }
     else
     {
         return(PlatformPropsTemplatePath);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Gets the correct platform template file path.
 /// </summary>
 /// <param name="platform">The platform of the requested template.</param>
 /// <param name="configuration">The configuration of the requested template.</param>
 /// <returns>The absolute file path for the platform template to use.</returns>
 public FileInfo GetTemplateFilePathForPlatform(string platform, string configuration, ScriptingBackend scriptingBackend)
 {
     if (PlatformTemplates.TryGetValue($"{platform}.{configuration}.{scriptingBackend.ToString()}.props.template", out FileInfo templatePath) ||
         PlatformTemplates.TryGetValue($"{platform}.{configuration}.Any.props.template", out templatePath) ||
         PlatformTemplates.TryGetValue($"{platform}.Configuration.Any.props.template", out templatePath))
     {
         return(templatePath);
     }
     else
     {
         return(PlatformPropsTemplatePath);
     }
 }