Skip to content

Commit 5504eea

Browse files
committed
New tutorial added
1 parent b9e57ae commit 5504eea

File tree

169 files changed

+6122
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+6122
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.4.33213.308
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{73460B62-B293-4347-91F6-AA75BFCD0439}"
7+
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PainKiller.PowerCommands.ReadLine", "PowerML\Core\PainKiller.PowerCommands.ReadLine\PainKiller.PowerCommands.ReadLine.csproj", "{0D3FCCBD-CC8B-48CC-B6F2-B7102C619639}"
9+
EndProject
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PainKiller.PowerCommands.Configuration", "PowerML\Core\PainKiller.PowerCommands.Configuration\PainKiller.PowerCommands.Configuration.csproj", "{71D8D560-47FF-47D0-B0F1-2A6CA24F7E38}"
11+
EndProject
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PainKiller.PowerCommands.Core", "PowerML\Core\PainKiller.PowerCommands.Core\PainKiller.PowerCommands.Core.csproj", "{43073038-6F79-4AE0-AF1D-737ACA3F74D7}"
13+
EndProject
14+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PainKiller.PowerCommands.Security", "PowerML\Core\PainKiller.PowerCommands.Security\PainKiller.PowerCommands.Security.csproj", "{23196156-7F02-46CD-B86D-B983ECD33166}"
15+
EndProject
16+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PainKiller.PowerCommands.Shared", "PowerML\Core\PainKiller.PowerCommands.Shared\PainKiller.PowerCommands.Shared.csproj", "{C4605A00-7DCA-43E6-A103-54C555334549}"
17+
EndProject
18+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Third party components", "Third party components", "{03FDE779-C102-48D7-B5FA-8FA9E1DBB3A6}"
19+
EndProject
20+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PainKiller.SerilogExtensions", "PowerML\Third party components\PainKiller.SerilogExtensions\PainKiller.SerilogExtensions.csproj", "{B14AD0B9-1DC7-4C06-B0DE-F087B0309E50}"
21+
EndProject
22+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PainKiller.PowerCommands.Bootstrap", "PowerML\PainKiller.PowerCommands.Bootstrap\PainKiller.PowerCommands.Bootstrap.csproj", "{5C8E20E5-C27E-4EB7-AA73-5B40D116E1CE}"
23+
EndProject
24+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PowerMLCommands", "PowerML\PowerMLCommands\PowerMLCommands.csproj", "{B7CFB6AA-CBF6-48BE-94ED-205741D376F6}"
25+
EndProject
26+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PainKiller.PowerCommands.PowerCommandsConsole", "PowerML\PainKiller.PowerCommands.PowerCommandsConsole\PainKiller.PowerCommands.PowerCommandsConsole.csproj", "{3EC65B7C-C6C0-43EC-902D-A2AAE5A88EBF}"
27+
EndProject
28+
Global
29+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
30+
Debug|Any CPU = Debug|Any CPU
31+
Release|Any CPU = Release|Any CPU
32+
EndGlobalSection
33+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
34+
{0D3FCCBD-CC8B-48CC-B6F2-B7102C619639}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
35+
{0D3FCCBD-CC8B-48CC-B6F2-B7102C619639}.Debug|Any CPU.Build.0 = Debug|Any CPU
36+
{0D3FCCBD-CC8B-48CC-B6F2-B7102C619639}.Release|Any CPU.ActiveCfg = Release|Any CPU
37+
{0D3FCCBD-CC8B-48CC-B6F2-B7102C619639}.Release|Any CPU.Build.0 = Release|Any CPU
38+
{71D8D560-47FF-47D0-B0F1-2A6CA24F7E38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39+
{71D8D560-47FF-47D0-B0F1-2A6CA24F7E38}.Debug|Any CPU.Build.0 = Debug|Any CPU
40+
{71D8D560-47FF-47D0-B0F1-2A6CA24F7E38}.Release|Any CPU.ActiveCfg = Release|Any CPU
41+
{71D8D560-47FF-47D0-B0F1-2A6CA24F7E38}.Release|Any CPU.Build.0 = Release|Any CPU
42+
{43073038-6F79-4AE0-AF1D-737ACA3F74D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
43+
{43073038-6F79-4AE0-AF1D-737ACA3F74D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
44+
{43073038-6F79-4AE0-AF1D-737ACA3F74D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
45+
{43073038-6F79-4AE0-AF1D-737ACA3F74D7}.Release|Any CPU.Build.0 = Release|Any CPU
46+
{23196156-7F02-46CD-B86D-B983ECD33166}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
47+
{23196156-7F02-46CD-B86D-B983ECD33166}.Debug|Any CPU.Build.0 = Debug|Any CPU
48+
{23196156-7F02-46CD-B86D-B983ECD33166}.Release|Any CPU.ActiveCfg = Release|Any CPU
49+
{23196156-7F02-46CD-B86D-B983ECD33166}.Release|Any CPU.Build.0 = Release|Any CPU
50+
{C4605A00-7DCA-43E6-A103-54C555334549}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
51+
{C4605A00-7DCA-43E6-A103-54C555334549}.Debug|Any CPU.Build.0 = Debug|Any CPU
52+
{C4605A00-7DCA-43E6-A103-54C555334549}.Release|Any CPU.ActiveCfg = Release|Any CPU
53+
{C4605A00-7DCA-43E6-A103-54C555334549}.Release|Any CPU.Build.0 = Release|Any CPU
54+
{B14AD0B9-1DC7-4C06-B0DE-F087B0309E50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
55+
{B14AD0B9-1DC7-4C06-B0DE-F087B0309E50}.Debug|Any CPU.Build.0 = Debug|Any CPU
56+
{B14AD0B9-1DC7-4C06-B0DE-F087B0309E50}.Release|Any CPU.ActiveCfg = Release|Any CPU
57+
{B14AD0B9-1DC7-4C06-B0DE-F087B0309E50}.Release|Any CPU.Build.0 = Release|Any CPU
58+
{5C8E20E5-C27E-4EB7-AA73-5B40D116E1CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
59+
{5C8E20E5-C27E-4EB7-AA73-5B40D116E1CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
60+
{5C8E20E5-C27E-4EB7-AA73-5B40D116E1CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
61+
{5C8E20E5-C27E-4EB7-AA73-5B40D116E1CE}.Release|Any CPU.Build.0 = Release|Any CPU
62+
{B7CFB6AA-CBF6-48BE-94ED-205741D376F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
63+
{B7CFB6AA-CBF6-48BE-94ED-205741D376F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
64+
{B7CFB6AA-CBF6-48BE-94ED-205741D376F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
65+
{B7CFB6AA-CBF6-48BE-94ED-205741D376F6}.Release|Any CPU.Build.0 = Release|Any CPU
66+
{3EC65B7C-C6C0-43EC-902D-A2AAE5A88EBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
67+
{3EC65B7C-C6C0-43EC-902D-A2AAE5A88EBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
68+
{3EC65B7C-C6C0-43EC-902D-A2AAE5A88EBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
69+
{3EC65B7C-C6C0-43EC-902D-A2AAE5A88EBF}.Release|Any CPU.Build.0 = Release|Any CPU
70+
EndGlobalSection
71+
GlobalSection(SolutionProperties) = preSolution
72+
HideSolutionNode = FALSE
73+
EndGlobalSection
74+
GlobalSection(NestedProjects) = preSolution
75+
{0D3FCCBD-CC8B-48CC-B6F2-B7102C619639} = {73460B62-B293-4347-91F6-AA75BFCD0439}
76+
{71D8D560-47FF-47D0-B0F1-2A6CA24F7E38} = {73460B62-B293-4347-91F6-AA75BFCD0439}
77+
{43073038-6F79-4AE0-AF1D-737ACA3F74D7} = {73460B62-B293-4347-91F6-AA75BFCD0439}
78+
{23196156-7F02-46CD-B86D-B983ECD33166} = {73460B62-B293-4347-91F6-AA75BFCD0439}
79+
{C4605A00-7DCA-43E6-A103-54C555334549} = {73460B62-B293-4347-91F6-AA75BFCD0439}
80+
{B14AD0B9-1DC7-4C06-B0DE-F087B0309E50} = {03FDE779-C102-48D7-B5FA-8FA9E1DBB3A6}
81+
EndGlobalSection
82+
GlobalSection(ExtensibilityGlobals) = postSolution
83+
SolutionGuid = {B0893743-C697-4E63-9BC7-2D16B9D63C40}
84+
EndGlobalSection
85+
EndGlobal
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
using PainKiller.PowerCommands.Configuration.Contracts;
2+
using PainKiller.PowerCommands.Configuration.DomainObjects;
3+
using PainKiller.PowerCommands.Configuration.Extensions;
4+
using YamlDotNet.Serialization;
5+
using YamlDotNet.Serialization.NamingConventions;
6+
7+
namespace PainKiller.PowerCommands.Configuration
8+
{
9+
public class ConfigurationService : IConfigurationService
10+
{
11+
private ConfigurationService() { }
12+
13+
private static readonly Lazy<IConfigurationService> Lazy = new(() => new ConfigurationService());
14+
public static IConfigurationService Service => Lazy.Value;
15+
public YamlContainer<T> Get<T>(string inputFileName = "") where T : new()
16+
{
17+
var fileName = string.IsNullOrEmpty(inputFileName) ? $"{typeof(T).Name}.yaml".GetSafePathRegardlessHowApplicationStarted() : inputFileName.GetSafePathRegardlessHowApplicationStarted();
18+
var yamlContent = File.ReadAllText(fileName);
19+
20+
var deserializer = new DeserializerBuilder()
21+
.WithNamingConvention(CamelCaseNamingConvention.Instance)
22+
.Build();
23+
try
24+
{
25+
return deserializer.Deserialize<YamlContainer<T>>(yamlContent);
26+
}
27+
catch (Exception)
28+
{
29+
Console.WriteLine($"Could not deserialize the configuration file, default configuration will be loaded instead\nA template configuration file named default_{typeof(T).Name}.yaml will be created in application root.");
30+
var defaultConfig = new T();
31+
SaveChanges(defaultConfig, $"default_{typeof(T).Name}.yaml");
32+
return new YamlContainer<T>();
33+
}
34+
}
35+
public string SaveChanges<T>(T configuration, string inputFileName = "") where T : new()
36+
{
37+
if (configuration is null) return "";
38+
var fileName = string.IsNullOrEmpty(inputFileName) ? $"{configuration.GetType().Name}.yaml".GetSafePathRegardlessHowApplicationStarted() : inputFileName.GetSafePathRegardlessHowApplicationStarted();
39+
40+
var yamlContainer = new YamlContainer<T> { Configuration = configuration, Version = "1.0" };
41+
var serializer = new SerializerBuilder()
42+
.WithNamingConvention(CamelCaseNamingConvention.Instance)
43+
.Build();
44+
var yamlData = serializer.Serialize(yamlContainer);
45+
File.WriteAllText(fileName, yamlData);
46+
return fileName;
47+
}
48+
49+
public void Create<T>(T configuration, string fullFileName) where T : new()
50+
{
51+
if (configuration is null) return;
52+
var yamlContainer = new YamlContainer<T> { Configuration = configuration, Version = "1.0" };
53+
var serializer = new SerializerBuilder()
54+
.WithNamingConvention(CamelCaseNamingConvention.Instance)
55+
.Build();
56+
var yamlData = serializer.Serialize(yamlContainer);
57+
File.WriteAllText(fullFileName, yamlData);
58+
}
59+
60+
/// <summary>
61+
/// Return a configuration file stored in the AppData/Roaming/PowerCommands directory, if the file does not exist it will be created.
62+
/// </summary>
63+
/// <typeparam name="T"></typeparam>
64+
/// <param name="defaultIfMissing"></param>
65+
/// <param name="inputFileName"></param>
66+
/// <returns></returns>
67+
public YamlContainer<T> GetAppDataConfiguration<T>(T defaultIfMissing, string inputFileName = "") where T : new()
68+
{
69+
var directory = $"{Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)}\\{nameof(PowerCommands)}";
70+
if (!Directory.Exists(directory)) Directory.CreateDirectory(directory);
71+
var fileName = Path.Combine(directory, inputFileName);
72+
if (!File.Exists(fileName))
73+
{
74+
var yaml = CreateContent(defaultIfMissing);
75+
File.WriteAllText(fileName, yaml);
76+
}
77+
var yamlContent = File.ReadAllText(fileName);
78+
var deserializer = new DeserializerBuilder()
79+
.WithNamingConvention(CamelCaseNamingConvention.Instance)
80+
.Build();
81+
return deserializer.Deserialize<YamlContainer<T>>(yamlContent);
82+
}
83+
private string CreateContent<T>(T item) where T : new()
84+
{
85+
if (item is not null)
86+
{
87+
var yamlContainer = new YamlContainer<T> { Configuration = item, Version = "1.0" };
88+
var serializer = new SerializerBuilder()
89+
.WithNamingConvention(CamelCaseNamingConvention.Instance)
90+
.Build();
91+
var yamlData = serializer.Serialize(yamlContainer);
92+
return yamlData;
93+
}
94+
return "--- item is null and can not be serialized ---";
95+
}
96+
}
97+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using PainKiller.PowerCommands.Configuration.DomainObjects;
2+
3+
namespace PainKiller.PowerCommands.Configuration.Contracts
4+
{
5+
public interface IConfigurationService
6+
{
7+
YamlContainer<T> Get<T>(string inputFileName = "") where T : new();
8+
string SaveChanges<T>(T configuration, string inputFileName = "") where T : new();
9+
void Create<T>(T configuration, string fullFileName) where T : new();
10+
YamlContainer<T> GetAppDataConfiguration<T>(T defaultIfMissing, string inputFileName = "") where T : new();
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
namespace PainKiller.PowerCommands.Configuration.DomainObjects
2+
{
3+
public class ArtifactPathsConfiguration
4+
{
5+
public string Name { get; set; } = "Name";
6+
public string Download { get; set; } = "PainKiller.PowerCommands.MyExampleCommands";
7+
public string Templates { get; set; } = "{appdata}|templates";
8+
public string[] ValidProjectFiles { get; set; } = {
9+
"PainKiller.PowerCommands.Bootstrap\\PainKiller.PowerCommands.Bootstrap.csproj",
10+
"PainKiller.PowerCommands.PowerCommandsConsole\\PainKiller.PowerCommands.PowerCommandsConsole.csproj",
11+
"Core",
12+
"Third party components",
13+
"Third party components\\PainKiller.SerilogExtensions\\PainKiller.SerilogExtensions.csproj",
14+
"Core\\PainKiller.PowerCommands.Configuration\\PainKiller.PowerCommands.Configuration.csproj",
15+
"Core\\PainKiller.PowerCommands.Core\\PainKiller.PowerCommands.Core.csproj",
16+
"Core\\PainKiller.PowerCommands.ReadLine\\PainKiller.PowerCommands.ReadLine.csproj",
17+
"Core\\PainKiller.PowerCommands.Security\\PainKiller.PowerCommands.Security.csproj",
18+
"Core\\PainKiller.PowerCommands.Shared\\PainKiller.PowerCommands.Shared.csproj",
19+
"PainKiller.PowerCommands.MyExampleCommands\\PainKiller.PowerCommands.MyExampleCommands.csproj"
20+
};
21+
22+
public string[] Commands { get; set; } = { "Demo", "Config", "Dir", "Doc" };
23+
public string[] TemplateCommands { get; set; } = { "Default" };
24+
public string VsCode { get; set; } = "PowerCommands2022\\.vscode\\";
25+
public string CustomComponents { get; set; } = "PowerCommands2022\\src\\PainKiller.PowerCommands\\Custom Components\\";
26+
public string DocsDbFile { get; set; } = "PowerCommands2022\\src\\PainKiller.PowerCommands\\Core\\PainKiller.PowerCommands.Core\\DocsDB.data";
27+
public string DocsDbGithub { get; set; } = "https://raw.githubusercontent.com/PowerCommands/PowerCommands2022/main/src/PainKiller.PowerCommands/Core/PainKiller.PowerCommands.Core/DocsDB.data";
28+
public string GithubRoot { get; set; } = "https://raw.githubusercontent.com/PowerCommands/PowerCommands2022/main/src/PainKiller.PowerCommands";
29+
public ArtifactSourcePaths Source { get; set; } = new();
30+
public ArtifactTargetPaths Target { get; set; } = new();
31+
}
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
namespace PainKiller.PowerCommands.Configuration.DomainObjects
2+
{
3+
public class ArtifactSourcePaths
4+
{
5+
public string ExampleProjectFile { get; set; } = "PowerCommands2022\\src\\PainKiller.PowerCommands\\PainKiller.PowerCommands.{name}Commands\\PainKiller.PowerCommands.MyExampleCommands.csproj";
6+
public string SolutionFileName { get; set; } = "PowerCommands2022\\src\\PainKiller.PowerCommands\\PowerCommands.{name}.sln";
7+
public string CommandsProject { get; set; } = "PowerCommands2022\\src\\PainKiller.PowerCommands\\PainKiller.PowerCommands.MyExampleCommands";
8+
public string RenamedCommandsProject { get; set; } = "PowerCommands2022\\src\\PainKiller.PowerCommands\\PainKiller.PowerCommands.{name}Commands";
9+
public string BootstrapProject { get; set; } = "PowerCommands2022\\src\\PainKiller.PowerCommands\\PainKiller.PowerCommands.Bootstrap";
10+
public string ConsoleProject { get; set; } = "PowerCommands2022\\src\\PainKiller.PowerCommands\\PainKiller.PowerCommands.PowerCommandsConsole";
11+
public string ThirdParty { get; set; } = "PowerCommands2022\\src\\PainKiller.PowerCommands\\Third party components";
12+
public string Template { get; set; } = "{_name}\\PowerCommands2022\\src\\PainKiller.PowerCommands\\PainKiller.PowerCommands.MyExampleCommands\\Commands\\Templates";
13+
public string Backup { get; set; } = "\\download\\{_name}";
14+
public string Core { get; set; } = "PowerCommands2022\\src\\PainKiller.PowerCommands\\Core";
15+
}
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
namespace PainKiller.PowerCommands.Configuration.DomainObjects
2+
{
3+
public class ArtifactTargetPaths
4+
{
5+
public string ExampleProjectFile { get; set; } = "PainKiller.PowerCommands.MyExampleCommands\\PainKiller.PowerCommands.MyExampleCommands.csproj";
6+
public string SolutionFileName { get; set; } = "PainKiller.PowerCommands\\PowerCommands.{name}.sln";
7+
public string CommandsProject { get; set; } = "PainKiller.PowerCommands.{name}Commands";
8+
public string BootstrapProject { get; set; } = "PainKiller.PowerCommands.Bootstrap";
9+
public string ConsoleProject { get; set; } = "PainKiller.PowerCommands.PowerCommandsConsole";
10+
public string ThirdParty { get; set; } = "Third party components";
11+
public string Template { get; set; } = "Commands";
12+
public string Backup { get; set; } = "\\backup\\{_name}";
13+
public string Core { get; set; } = "Core";
14+
}
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace PainKiller.PowerCommands.Configuration.DomainObjects
2+
{
3+
public static class ConfigurationGlobals
4+
{
5+
public const string Prompt = "pcm>";
6+
public const string MainConfigurationFile = "PowerCommandsConfiguration.yaml";
7+
public const string SecurityFileName = "security.yaml";
8+
public static readonly string ApplicationDataFolder = $"{Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)}\\{nameof(PowerCommands)}";
9+
}
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace PainKiller.PowerCommands.Configuration.DomainObjects
2+
{
3+
public class EncryptionConfiguration
4+
{
5+
public string SharedSecretEnvironmentKey { get; set; } = "";
6+
public string SharedSecretSalt { get; set; } = "";
7+
}
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace PainKiller.PowerCommands.Configuration.DomainObjects
2+
{
3+
public class SecurityConfiguration
4+
{
5+
public EncryptionConfiguration Encryption { get; set; } = new();
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace PainKiller.PowerCommands.Configuration.DomainObjects
2+
{
3+
public class YamlContainer<T> where T : new()
4+
{
5+
public string Version { get; set; } = "";
6+
public T Configuration { get; set; } = new();
7+
}
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using PainKiller.PowerCommands.Configuration.DomainObjects;
2+
3+
namespace PainKiller.PowerCommands.Configuration.Extensions
4+
{
5+
public static class ConfigurationExtension
6+
{
7+
public static string GetSafePathRegardlessHowApplicationStarted(this string fileName, string directory = "") => string.IsNullOrEmpty(directory) ? Path.Combine(AppContext.BaseDirectory, fileName) : Path.Combine(AppContext.BaseDirectory, directory, fileName);
8+
9+
public static string GetPath(this ArtifactPathsConfiguration configuration, string config)
10+
{
11+
var paths = config.Split('|');
12+
if (string.IsNullOrEmpty(config)) return "";
13+
if (paths.Length == 1) return ReplaceTags(config, configuration.Name);
14+
if (paths.Length == 2) return Path.Combine(ReplaceTags(paths[0], configuration.Name), ReplaceTags(paths[1], configuration.Name));
15+
return Path.Combine(ReplaceTags(paths[0], configuration.Name), ReplaceTags(paths[1], configuration.Name), ReplaceTags(paths[2], configuration.Name));
16+
}
17+
private static string ReplaceTags(string raw, string name) => raw.Replace("{appdata}", AppContext.BaseDirectory).Replace("{name}", name);
18+
}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
5+
<LangVersion>10.0</LangVersion>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
</PropertyGroup>
9+
10+
<ItemGroup>
11+
<PackageReference Include="YamlDotNet" Version="11.2.1" />
12+
</ItemGroup>
13+
14+
<ItemGroup>
15+
<Folder Include="Extensions\" />
16+
</ItemGroup>
17+
18+
</Project>

0 commit comments

Comments
 (0)