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
using System.Diagnostics; | |
using System.Runtime.CompilerServices; | |
namespace CallerInfoExample | |
{ | |
public static class Logger | |
{ | |
public static void Log(string message, | |
[CallerFilePath] string sourceFilePath = "", | |
[CallerLineNumber] int sourceLineNumber = 0, |
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
<appSettings> | |
<add key="dbConnectionString" value="localMachineConnectionString"/> | |
</appSettings> |
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
<appSettings file="localAppSettings.config"> | |
<add key="dbConnectionString" value="sourceControlConnectionString"/> | |
<add key="someRandomApplicationSetting" value="sourceControlApplicationSetting"/> | |
</appSettings> |
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
using (var httpClient = new HttpClient()) | |
{ | |
await httpClient.GetAsync(new Uri("http://bing.com")); | |
} |
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
namespace HttpClientTest | |
{ | |
using System; | |
using System.Net.Http; | |
class Program | |
{ | |
private static readonly int _connections = 1000; | |
private static readonly HttpClient _httpClient = new HttpClient(); |
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
{ | |
"ConnectionStrings": { | |
"DefaultConnection": "Server=MY_MACHINE_NAME;Database=MY_LOCAL_DB;Trusted_Connection=True;MultipleActiveResultSets=true" | |
} | |
} |
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
if (env.IsDevelopment() || env.IsEnvironment("Local")) | |
{ | |
app.UseDeveloperExceptionPage(); | |
} |
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 abstract class SomeAbstractDto | |
{ | |
} | |
public class DerivedSomeDto1 : SomeAbstractDto | |
{ | |
public string SomeRandomProperty1 {get; set; } | |
public string SomeRandomProperty2 {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
public abstract class SomeAbstractRepository | |
{ | |
} | |
public class DerivedSomeRepository1 : SomeAbstractRepository | |
{ | |
public string SomeRandomProperty1 {get; set; } | |
public string SomeRandomProperty2 {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
public class NestedChildRepository | |
{ | |
. | |
. | |
public AbsractBaseRepository AbsractBaseRepository {get; set; } | |
. | |
. | |
} |