View example.cs
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 readonly struct Measurement | |
{ | |
public Measurement() | |
{ | |
Value = double.NaN; | |
Description = "Undefined"; | |
} | |
public Measurement(double value, string description) | |
{ |
View example.cs
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
var v = $"Count ist: { this.Is.Really.Something() | |
.That.I.Should( | |
be + able)[ | |
to.Wrap()] }."; |
View example.cs
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
var configuration = new Configuration(new Dictionary<string, string>() { | |
["product"] = "shield" | |
}); |
View example.cs
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 Dictionary<string, string> Config() | |
{ | |
return new Dictionary<string,string>(){ | |
["product"] = "shield" | |
}; | |
} |
View example.cs
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
class Tokenizer | |
{ | |
public string Tokenize(string code) | |
{ | |
var regexes = new string[] { | |
// ... | |
}; | |
var statements = explode(" ", code); | |
var tokens = new string[] {}; |
View example.cs
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 string ParseBetterJSAlternative(string code) | |
{ | |
var regexes = [ | |
// ... | |
]; | |
var statements = explode(" ", code); | |
var tokens = new string[] {}; | |
foreach (var regex in regexes) | |
{ |
View cc6.cs
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 void RequestMethod(string url) | |
{ | |
// ... | |
} | |
var request = RequestMethod(requestUrl); | |
SlackChannel("bytehide", request, "get users"); |
View cc5.cs
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 void OldRequestMethod(string url) | |
{ | |
// ... | |
} | |
public void NewRequestMethod(string url) | |
{ | |
// ... | |
} |
View cc4.cs
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 SlackNotification | |
{ | |
//... | |
public void Send() | |
{ | |
SendMessage(this._to, this._files, this._body); | |
} | |
} |
View cc3.cs
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 SlackNotification | |
{ | |
//... | |
public void Handle() | |
{ | |
SendMessage(this._to, this._files, this._body); | |
} | |
} |
NewerOlder