References:
- Microsoft Tutorial: Set up a custom prompt in Windows Terminal
- Scott Hanselman's Blog Post: Ultimate PowerShell Prompt with Oh My Posh and Windows Terminal
- Scott Hanselman's YouTube Video: How to make the ultimate Terminal Prompt on Windows 11 >
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class JsonFilesRepository | |
{ | |
private const string Root = "../../../json/"; | |
public Dictionary<string, string> Files { get; } = new(); | |
public JsonFilesRepository(params string[] files) | |
{ | |
var filesList = files.ToList(); | |
if (!filesList.Any()) | |
foreach (var file in Directory.GetFiles(Root)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ItemGroup> | |
<InternalsVisibleTo Include="SpecFlowWebApi.Specs" /> | |
</ItemGroup> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class Program { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IWeatherRepository | |
{ | |
Task<IEnumerable<WeatherForecast>> GetAsync(); | |
Task<WeatherForecast?> GetAsync(int id); | |
Task<WeatherForecast?> AddAsync(WeatherForecast entity); | |
Task<WeatherForecast?> UpdateAsync(WeatherForecast entity); | |
Task<int> RemoveAsync(int id); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void SaveLocalSagaConfig(SagaConfigurationDto sagaConfig) | |
{ | |
var options = new JsonSerializerOptions | |
{ | |
WriteIndented = true, | |
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping | |
}; | |
var json = JsonSerializer.Serialize(sagaConfig, options); | |
File.WriteAllText(settings.SagaConfigPath, json); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class InterfaceConverter<TImplementation, TInterface> : JsonConverter<TInterface> | |
where TImplementation : class, TInterface | |
{ | |
public override TInterface? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) | |
=> JsonSerializer.Deserialize<TImplementation>(ref reader, options); | |
public override void Write(Utf8JsonWriter writer, TInterface value, JsonSerializerOptions options) | |
{ | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyAppSettings | |
{ | |
public string StringSetting { get; set; } | |
public int IntSetting { get; set; } | |
public bool BoolSetting { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project> | |
<ItemGroup> | |
<Files Include="$(MSBuildThisFileDirectory)/../contentFiles/CodeTemplates/**/*.*" /> | |
</ItemGroup> | |
<Target Name="CopyFiles" AfterTargets="Build"> | |
<Copy SourceFiles="@(Files)" DestinationFolder="$(TargetDir)/CodeTemplates/%(RecursiveDir)" /> | |
</Target> | |
</Project> |