随笔分类 - C#
C#
WCF 的客户端
摘要:对于 WCF 的客户端来说,WCF 服务就像是一个 Web Service 一样,在 Visual Studio 2008 中,所有 WCF 服务的连接都是由客户端的 服务代理(WCF Service Proxy) 来运行,开发人员不用花费太多心思在通信上,而 WCF Service Proxy 在 Visual Studio 中被称为服务引用(Service Reference)。 在 Visual Studio 中加入 WCF 的服务引用时,Visual Studio 会自动帮开发人员做掉一些必要工作(例如组态创建以及产生 Service Proxy 等),开发人员只需要在代码中取用 ..
阅读全文
New B2CShop - Code Smith 修改
摘要:1. DAL 层的 LoadAllForeignKeyColumn 中 if (string.IsNullOrEmpty(loadOptions) || items == null || items.Count() == 0) { return; }应该改为: if (string.IsNullOrEmpty(loadOptions) || items == null || !items.Any()) { return; }2. 去掉 GetEntityBySql 中的 // CodeSmith 注释:如果该表有外键则有如下代码
阅读全文
正则表达式解析对象
摘要:代码胜过一切!Program.csusing System;using System.Collections.Generic;using System.Text.RegularExpressions;namespace ConAppRegex{ public static class RegexHelper { public static readonly Regex regValidateObject = new Regex(@"(?n)(?<name>[^{},]+)\{(?<data>((?<o>\{)|(?<-o>\})|[^{
阅读全文
浙公网安备 33010602011771号