挑选正确的架构约等于选择正确的战斗并做好权衡
- 明确系统边界
- 用户案列 (描述哪些业务,事件,组合在一起会产生什么样的效果)
- 谁使用这个系统?
- 他们怎么使用这个系统?
| using System; | |
| using System.Threading; | |
| using OpenQA.Selenium; | |
| using OpenQA.Selenium.Chrome; | |
| namespace CrazyVote1 | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) |
Picking the right architecture = Picking the right battles + Managing trade-offs
| BasicHttpBinding binding = (BasicHttpBinding)WcfServiceType.GetBinding(typeof(BasicHttpBinding)); | |
| if (this._isSecurity) | |
| { | |
| Uri remoteUri = new Uri(string.IsNullOrWhiteSpace(this._remoteUri) ? this._serviceAddress : this._remoteUri); | |
| if(remoteUri.Scheme.Equals(Uri.UriSchemeHttp,StringComparison.OrdinalIgnoreCase)) | |
| { | |
| binding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly; | |
| } |