This file contains hidden or 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 CustomerToFaithfulCustomerDto : Mapping<FaithfulOrderDto, Order> | |
| { | |
| public override void Fill(FaithfulOrderDto target, Order source) | |
| { | |
| target.Total = source.Total; | |
| target.Customer = With<CustomerToCustomerDto>().Map(source.Customer); | |
| } | |
| } | |
| public class CustomerToCustomerDto : Mapping<CustomerDto, Customer> |
This file contains hidden or 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 static class OrderMappingsExtensions | |
| { | |
| public static void Fill(this FaithfulOrderDto target, Order source) | |
| { | |
| target.Total = source.Total; | |
| target.Customer = MapTo<CustomerDto>().From(c => c.Fill(source.Customer)); | |
| // Additionally, we also should have some syntax for ignoring properties | |
| // to allow a generic test that automatically discovers all Fill methods | |
| // know which properties are deliberately ignored. Not sure which syntax |
This file contains hidden or 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
| # Azure | |
| Definitions: | |
| - IaaS: A provider lets you host virtual machines, Docker instances or Kubernetes clusters and manages the that for you | |
| - PaaS: A provider hosts a specific server technology for you and also manages the updates for that techology (eg. Amazon S3) | |
| - SaaS: A provider hosts an application for you and also manages application updates | |
| I prefer PaaS whenever possible because it reduces the complexity on my side and when the service doesn't work, their support | |
| will know about the technology in question rather than just about the underlying infrastructure. |
This file contains hidden or 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
| create database [name] collate Latin1_General_100_CI_AS_SC_UTF8 | |
| create database [name] collate Latin1_General_100_BIN2_UTF8 |
This file contains hidden or 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
| license: mit | |
| height: 720 | |
| border: no |
This file contains hidden or 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 rows = String.Join("", Enumerable.Range(1, 100).Select(i => $"<tr><td>row #{i}</td></tr>").ToArray()); | |
| var html = $@" | |
| <div> | |
| <table> | |
| <thead> | |
| <tr> | |
| <td>header</td> | |
| </tr> | |
| </thead> |
This file contains hidden or 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.Collections.Generic; | |
| using System.Linq; | |
| using System.Linq.Expressions; | |
| using System.Reflection; | |
| namespace Properties.Internals | |
| { | |
| public class PropertyPairHelper<T, S> | |
| { |
This file contains hidden or 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
| // TwitPic/OAuth.cs | |
| // | |
| // Code to do OAuth stuff, in support of a cropper plugin that sends | |
| // a screen snap to TwitPic.com. | |
| // | |
| // There's one main class: OAuth.Manager. It handles interaction with the OAuth- | |
| // enabled service, for requesting temporary tokens (aka request tokens), as well | |
| // as access tokens. It also provides a convenient way to construct an oauth | |
| // Authorization header for use in any Http transaction. | |
| // |
This file contains hidden or 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.Net.Sockets; | |
| using System.Net; | |
| using System.Text; | |
| using System.Threading; | |
| namespace UDPer | |
| { | |
| class UDPer | |
| { |
This file contains hidden or 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
| Get-ChildItem -Recurse -Include bin,obj |? { $_.FullName -inotmatch 'node_modules' } | foreach { Remove-Item -Recurse $_ } |
NewerOlder