12 2008 档案

摘要:提高 LINQ to XML 中的性能的一种方法是预原子化 XName 对象。预原子化是指在通过使用 XElement 和 XAttribute 类的构造函数创建 XML 树之前,先将字符串分配给 XName 对象。然后传递初始化的 XName 对象,而不是将字符串传递给构造函数(此过程将使用从字符串到 XName 的隐式转换)。 XName Root = "Root"; XName Data =... 阅读全文
posted @ 2008-12-26 15:53 昕友软件开发 阅读(288) 评论(0) 推荐(0) 编辑
摘要:string xslMarkup = @" "; XDocument xmlTree = new XDocument( ... 阅读全文
posted @ 2008-12-26 15:21 昕友软件开发 阅读(283) 评论(0) 推荐(0) 编辑
摘要:XElement root = XElement.Load("Irregular.xml"); IEnumerable configParameters = root.Elements("Customer").Elements("Config"). Elements("ConfigParameter"); foreach (XElement cp in configParamet... 阅读全文
posted @ 2008-12-26 14:39 昕友软件开发 阅读(212) 评论(0) 推荐(0) 编辑
摘要://检索元素集合 XElement po = XElement.Load("c:/test.xml"); IEnumerable childElements = //from el in po.Descendants("Book") from el in po.Descendants("... 阅读全文
posted @ 2008-12-26 11:46 昕友软件开发 阅读(1119) 评论(0) 推荐(0) 编辑
摘要:IEnumerable grandChildData = from el in StreamRootChildDoc(new StringReader(markup)) where (int)el.Attribute("Key") > 1 select (string)el.Element("Grand... 阅读全文
posted @ 2008-12-26 11:23 昕友软件开发 阅读(357) 评论(0) 推荐(0) 编辑
摘要:XDocument d = new XDocument( new XComment("This is a comment."), new XProcessingInstruction("xml-stylesheet", "href='mystyle.css' title='Compact' type='text/css'"), new... 阅读全文
posted @ 2008-12-26 10:37 昕友软件开发 阅读(640) 评论(0) 推荐(0) 编辑
摘要:XElement c = new XElement("Customers", new XElement("Customer", new XElement("Name", "John Doe"), new XElement("PhoneNumbers", new XElement("Phone", ... 阅读全文
posted @ 2008-12-26 10:03 昕友软件开发 阅读(280) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml.Linq; namespace linq { class Program { static void Main(string[] args) { ... 阅读全文
posted @ 2008-12-26 10:00 昕友软件开发 阅读(404) 评论(0) 推荐(0) 编辑
摘要:public IQueryable Find(TEntity obj) where TEntity : class { //获得所有property的信息 PropertyInfo[] properties = obj.GetType().GetProperties(BindingFlags.Public | BindingFlag... 阅读全文
posted @ 2008-12-25 15:20 昕友软件开发 阅读(864) 评论(0) 推荐(0) 编辑
摘要:Imports Imports Imports Imports Module Module1 Sub Main() Dim db As New NorthwindDataContext Dim customers = From customer In db.Customers _ Order By c... 阅读全文
posted @ 2008-12-25 15:05 昕友软件开发 阅读(1012) 评论(0) 推荐(0) 编辑
摘要://C#的例子 using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.U... 阅读全文
posted @ 2008-12-25 14:55 昕友软件开发 阅读(423) 评论(0) 推荐(0) 编辑
摘要:Untitled Page Pick a cateogyr: ... 阅读全文
posted @ 2008-12-25 11:31 昕友软件开发 阅读(581) 评论(0) 推荐(0) 编辑
摘要:private void BindProducts(int startRow) { NorthwindDataContext db = new NorthwindDataContext(); //var ca = from c in db.Categories // where ... 阅读全文
posted @ 2008-12-25 10:20 昕友软件开发 阅读(1182) 评论(0) 推荐(0) 编辑
摘要:配置文件 代码: using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using Sy... 阅读全文
posted @ 2008-12-24 17:58 昕友软件开发 阅读(391) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml.Linq; using System.Xml; namespace ConsoleApplication1 { class Program { static vo... 阅读全文
posted @ 2008-12-24 17:13 昕友软件开发 阅读(213) 评论(0) 推荐(0) 编辑
摘要:主机:using System;using System.ServiceModel;namespace InheritanceDemo{ [ServiceContract] interface ISimpleCalculator { [OperationContract] int Add(int a... 阅读全文
posted @ 2008-12-23 18:07 昕友软件开发 阅读(1137) 评论(0) 推荐(0) 编辑
摘要:http://news.cnblogs.com/n/43821/ 阅读全文
posted @ 2008-12-23 09:27 昕友软件开发 阅读(179) 评论(0) 推荐(0) 编辑
摘要:http://news.cnblogs.com/n/43826/ 阅读全文
posted @ 2008-12-23 09:26 昕友软件开发 阅读(166) 评论(0) 推荐(0) 编辑
摘要:http://news.cnblogs.com/n/37151/ 阅读全文
posted @ 2008-12-23 09:25 昕友软件开发 阅读(293) 评论(0) 推荐(0) 编辑
摘要:http://news.cnblogs.com/n/44079/ 阅读全文
posted @ 2008-12-23 09:17 昕友软件开发 阅读(23172) 评论(0) 推荐(0) 编辑
摘要:WCF的中的Endpoint结构,一个Endpoint就类似于xml web service中的一个asmx文件,它包括三个组成部分1)Address 2) Binding 3) Contract,此三者被称为组成Endpoint的"ABC".A解决了Endpoint在哪的问题,也就是"Where ... 阅读全文
posted @ 2008-12-22 16:58 昕友软件开发 阅读(377) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ChickenAndEgg { class Program { static void Main(string[] args) { Eg... 阅读全文
posted @ 2008-12-19 17:22 昕友软件开发 阅读(219) 评论(0) 推荐(0) 编辑
摘要:participants The classes and/or objects participating in this pattern are: Context (Account) defines the interface of interest to clients maintains an instance of a Con... 阅读全文
posted @ 2008-12-19 17:05 昕友软件开发 阅读(369) 评论(0) 推荐(0) 编辑
摘要:participants The classes and/or objects participating in this pattern are: Handler (Approver) defines an interface for handling the requests (optional) implements th... 阅读全文
posted @ 2008-12-19 15:17 昕友软件开发 阅读(266) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace Flyweight { public partial class _Default : Sys... 阅读全文
posted @ 2008-12-19 11:16 昕友软件开发 阅读(207) 评论(0) 推荐(0) 编辑
摘要:1、最酷的就是这个航班浏览器了,微软写的例子。 http://silverlight.net/samples/sl2/silverlightairlines/run/default.html 源码下载:http://silverlight.net/samples/sl2/silverlightairlines/source/Source_SilverlightAirlines_CS.zip 2、欧... 阅读全文
posted @ 2008-12-19 10:39 昕友软件开发 阅读(380) 评论(0) 推荐(0) 编辑
摘要:participants The classes and/or objects participating in this pattern are: Component (LibraryItem) defines the interface for objects that can have responsibilities added to th... 阅读全文
posted @ 2008-12-18 16:54 昕友软件开发 阅读(221) 评论(0) 推荐(0) 编辑
摘要:... 阅读全文
posted @ 2008-12-18 11:03 昕友软件开发 阅读(287) 评论(0) 推荐(0) 编辑
摘要:http://blogs.msdn.com/corrinab/archive/2008/10/01/8971166.aspx 阅读全文
posted @ 2008-12-17 10:09 昕友软件开发 阅读(164) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Input; us... 阅读全文
posted @ 2008-12-17 09:53 昕友软件开发 阅读(605) 评论(0) 推荐(0) 编辑
摘要:... 阅读全文
posted @ 2008-12-17 09:52 昕友软件开发 阅读(515) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace SilverlightInterview.Web { public class Note { public Note() { } public string ID... 阅读全文
posted @ 2008-12-17 09:51 昕友软件开发 阅读(223) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; namespace SilverlightInterview.Web { /// /// StockService 的摘要说明 /// [W... 阅读全文
posted @ 2008-12-17 09:38 昕友软件开发 阅读(254) 评论(0) 推荐(0) 编辑
摘要:private void GetAllValues(XElement doc) { ChartValues = new List(); ChartKeys = new List(); var myValues = from pv in doc.Descendants("value") ... 阅读全文
posted @ 2008-12-12 17:40 昕友软件开发 阅读(438) 评论(0) 推荐(0) 编辑
摘要:编写WCF服务接口 using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.Text; namespace SilverlightApplication11.We... 阅读全文
posted @ 2008-12-10 12:51 昕友软件开发 阅读(307) 评论(0) 推荐(0) 编辑
摘要:编写Web service using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; namespace SilverlightApplication10.Web { /// /// WebService1 的摘... 阅读全文
posted @ 2008-12-10 12:50 昕友软件开发 阅读(323) 评论(0) 推荐(0) 编辑
摘要:在向特定 URI 发送 HTTP 请求时,基于 HTTP 的服务将返回数据。 HTTP 请求可以发送至各种 URI。此类 URI 包括 http://YouURL.com/service/getUser、http://YouURL.com/service.svc/getUser 等,甚至包括静态数据,例如 http://YouURL.com/data.xml。配置 HTTP 请求通常使用表示... 阅读全文
posted @ 2008-12-10 12:49 昕友软件开发 阅读(810) 评论(1) 推荐(0) 编辑
摘要:转载自[孟子E章] http://blog.csdn.net/net_lover/archive/2008/11/26/3379002.aspx ... 阅读全文
posted @ 2008-12-09 17:59 昕友软件开发 阅读(750) 评论(0) 推荐(0) 编辑
摘要:XML操作 将 XMLWriter 内容保存至客户端 修改 page.xaml 文件 在应用程序的 page.xaml.cs源文件中,添加下面的 using 语句: sing System.Xml; using System.IO; using System.Text; using System.IO.IsolatedStorage; 全部代码: using System; ... 阅读全文
posted @ 2008-12-09 17:09 昕友软件开发 阅读(1291) 评论(0) 推荐(0) 编辑
摘要:本地(客户端)数据存储 通过使用独立存储,数据将始终按用户在虚拟文件系统中隔离,虚拟文件系统可以是根目录中的一个文件,也可以是一个目录和文件树。 独立存储数据舱是一个抽象的存储位置,而不是一个具体的存储位置。它由一个或多个独立的存储文件(称为存储区)组成,这些存储文件包含存储数据的实际目录位置。任何类型的数据都可以保存到存储区中。 存储区通常驻留在客户端,但应用程序也可以使用服务器上的... 阅读全文
posted @ 2008-12-09 17:07 昕友软件开发 阅读(466) 评论(0) 推荐(0) 编辑
摘要:对象数据绑定 分三步实现: 1:在工程中创建一个类 using System; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Ink; using System.Windows.Input; usi... 阅读全文
posted @ 2008-12-09 17:04 昕友软件开发 阅读(321) 评论(0) 推荐(0) 编辑
摘要:泛型数据绑定 数组绑定 首先拖放一个ComboBox: 定义数组: int[] myIntArray = new int[5] { 1, 2, 3, 4, 5 }; Page代码绑定: QYLX.ItemsSource = myIntArray; List) 类绑定 List ListLX=n... 阅读全文
posted @ 2008-12-09 17:02 昕友软件开发 阅读(626) 评论(0) 推荐(0) 编辑
摘要:使用一个嵌套的 Canvas 创建了蓝色矩形框包围下的红色矩形效果。 Text Surrounded by a Border StackPanel垂直排列 水平排列 Grid 是 Silverlight 提供的灵活程度最高、功能最为强大的容器对象。Grid 定义一个由列和行组成的灵活的网格区域... 阅读全文
posted @ 2008-12-08 16:45 昕友软件开发 阅读(310) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Input; using System.Windows... 阅读全文
posted @ 2008-12-05 15:00 昕友软件开发 阅读(334) 评论(0) 推荐(0) 编辑
摘要:首先写一个类: public class Employee { public string FirstName { get; set; } public string LastName { get; set; } public decimal Salary { get; set; } public DateTime StartDate { get; set; } pub... 阅读全文
posted @ 2008-12-05 14:21 昕友软件开发 阅读(4003) 评论(0) 推荐(1) 编辑
摘要:新建一个类:Book using System.Collections.Generic; using System.ComponentModel; namespace GlobalStyles { public class Book : INotifyPropertyChanged { private string bookTitle; priv... 阅读全文
posted @ 2008-12-04 18:00 昕友软件开发 阅读(376) 评论(0) 推荐(0) 编辑
摘要:Silverlight网站“运行后一片空白”的解决方案: 在Silverlight中需要使用xap、XAML文件类型,如果您想在IIS服务器上使用Silverlight程序,所以必须在IIS中注册xaml和xap的MIME文件类型。打开IIS->站点属性->HTTP头->MIME类型->新建: 扩展名: .xap MIME类型:xapapplication/x-silverlight ... 阅读全文
posted @ 2008-12-02 14:39 昕友软件开发 阅读(1796) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Web; using System.Diagnostics; namespace HDI { public class HTTPFilter : IHttpModule { System.IO.StreamWriter fileWriter; HttpApplication applicationContext; ... 阅读全文
posted @ 2008-12-01 15:05 昕友软件开发 阅读(697) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts... 阅读全文
posted @ 2008-12-01 10:12 昕友软件开发 阅读(332) 评论(0) 推荐(0) 编辑

欢迎访问我的开源项目:xyIM企业即时通讯
点击右上角即可分享
微信分享提示