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
private void SetParentActions() | |
{ | |
Actions.Add(new CloseCurrentViewAction(this, beginGroup: true)); | |
Parent.ChildViewActions.Clear(); | |
Parent.ChildViewActions.Add(AddSideToCartAction); | |
Parent.Actions.Clear(); | |
foreach (IViewAction childViewAction in Parent.ChildViewActions) | |
Parent.Actions.Add(childViewAction); | |
Parent.Actions.Add(new CloseCurrentViewAction(Parent, beginGroup: 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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var mdbToXml = new MdbToXml(); | |
mdbToXml.GenerateXmlOutput(pathToData: @"C:\Temp\20140728\new.mdb", pathToOutput: @"C:\Temp\20140728\new.xml"); | |
mdbToXml.GenerateXmlOutput(pathToData: @"C:\Temp\20140728\old.mdb", pathToOutput: @"C:\Temp\20140728\old.xml"); | |
} | |
} |
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
Update-ExecutionPolicy Unrestricted | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions | |
Enable-RemoteDesktop | |
cinst NotepadPlusPlus.install -y | |
cinst 7zip -y | |
cinst Git.install -y | |
cinst visualstudiocode -y | |
cinst LastPass -y |
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 PersonServiceUnitTests | |
{ | |
[Test] | |
public void ShouldUseFake() | |
{ | |
var factory = new FakeSqlHelperFactory(); | |
var personService = new PersonServiceFourthPass(factory); | |
var expectedFirst = "Foo"; | |
var expectedLast = "Bar"; | |
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 Person | |
{ | |
public Person() | |
{ | |
PersonId = Guid.NewGuid(); | |
} | |
public Guid PersonId { get; set; } | |
public string FirstName { 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
using System; | |
using System.Globalization; | |
static class Program | |
{ | |
private static void Main() | |
{ | |
double d = 3.14; | |
IFormattable s = $"{d}"; | |
Console.WriteLine(s.ToString(null, CultureInfo.GetCultureInfo("cs-cz"))); |
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 Person | |
{ | |
public Guid PersonId { get; set; } | |
public string FirstName { get; set; } | |
public string LastName { get; set; } | |
} | |
public class Program | |
{ | |
public static void Main() |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 Gist-Embed currently - I like the way it styles the gists. | |
https://github.com/blairvanderhoof/gist-embed#other-ways-to-use-gist-embed | |
90% of the time, I'll do this: | |
<code data-gist-id="5457644" data-gist-file="example-file2.html"></code> | |
This might also be useful: | |
<code data-gist-id="5457668" data-gist-highlight-line="1,3,5"></code> |
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
static void RunService() | |
{ | |
var personService = new PersonService(new SqlHelperFactory()); | |
var person = new Person | |
{ | |
FirstName = "Joe", | |
LastName = "Reynolds" | |
}; | |
var newId = personService.WritePerson(person); | |
Console.WriteLine(newId); |
OlderNewer