- Browser Reload on Save
- ConEmuIntegration
- Copy As Html
- ConfigTransFormation
- Custom Document Well
- Double-Click Maxinize
- EF Core Power Tools
- GhostDoc Community for VS2017
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 MultipleXmlDocumentationProvider : IDocumentationProvider, IModelDocumentationProvider | |
{ | |
// 多個 XPathNavigator | |
private IList<XPathNavigator> _documentNavigators = new List<XPathNavigator>(); | |
private const string TypeExpression = "/doc/members/member[@name='T:{0}']"; | |
private const string MethodExpression = "/doc/members/member[@name='M:{0}']"; | |
private const string PropertyExpression = "/doc/members/member[@name='P:{0}']"; | |
private const string FieldExpression = "/doc/members/member[@name='F:{0}']"; | |
private const string ParameterExpression = "param[@name='{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
public enum Order | |
{ | |
Ascending, | |
Descending | |
} |
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 enum Order | |
{ | |
Ascending, | |
Descending | |
} |
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
[TestMethod] | |
public void TestCollection() | |
{ | |
var expected = new | |
{ | |
//Orders = (new List<int> { 11, 12 }).Select(p => new { Id = p }) | |
Orders = new[] | |
{ | |
new { Id = 11 }, | |
new { Id = 12 } |
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
// v1. Reflection | |
// 速度最慢,約 Delegate 的 4 倍 | |
return mi.Invoke(instance, new object[] { }); | |
// v2. Delegate | |
// 就撰寫難度與執行速度與可讀性,Delegate應列為首選 | |
return mi.CreateDelegate<Func<object>>(instance)(); |
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
TimeSpan nextDelay = TimeSpan.FromSeconds(2); | |
int retryNumber = 5; | |
// 監控結果 | |
string testString = ""; | |
for (int i = 0; i != retryNumber; i++) | |
{ | |
if (string.IsNullOrWhiteSpace(testString)) | |
{ | |
Console.WriteLine($"String is null, retry {i + 1} ..."); |
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
// https://github.com/bchavez/Bogus | |
var faker = new Faker("en"); | |
Console.WriteLine("----- Adress -----"); | |
var address = faker.Address; | |
address.BuildingNumber().Dump("BuildingNumber"); | |
address.City().Dump("City"); | |
address.CityPrefix().Dump("CityPrefix"); | |
address.CitySuffix().Dump("CitySuffix"); |
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
// For LINQPad use | |
// 32 digits | |
// ex: 4af8654b1c8142c793f47f9f33c6e883 | |
Guid.NewGuid().ToString("N").Dump("N"); | |
// 32 digits separated by hyphens | |
// ex: d197f0ba-797f-49d2-bdf3-883486f29a31 | |
Guid.NewGuid().ToString("D").Dump("D"); |
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
# escape=` | |
# The MSI installs a service which is hard to override, so let's use a zip file. | |
FROM microsoft/windowsservercore | |
#MAINTAINER bruce_chen@kingston.com.tw | |
LABEL maintainer="bruce_chen@kingston.com.tw" | |
SHELL ["powershell"] | |
RUN $ErrorActionPreference = 'Stop'; ` | |
wget https://github.com/MSOpenTech/redis/releases/download/win-3.2.100/Redis-x64-3.2.100.zip -OutFile Redis-x64-3.2.100.zip ; ` |
OlderNewer