untitled

Similar documents
了 立 連 立 量 領 來 例 蘭 便 不 數 不 論 更 更 更 力 更 參 例 來 例 見 量 度 量 量 參 論 量 行 量 量 瑩 理 來 錄 量 量 不 力 省 力 立 力 量 量 量 了 量 便 錄 錄 錄 料 說 省 6

I/O Files讀寫檔案:

untitled

untitled

untitled

untitled

中華民國第45屆中小學科學展覽會

untitled

untitled

第五章 鄉鎮圖書館閱讀推廣活動之分析

中華人民共和國殘疾人保障法(2008年修訂)

見 例 年 例 利 不 料 林 不 立 理 不 念 類 理 利 了 路 來 行 來 行 立 見不 立 亂 不 理 立 來 2

廉 樂 不 廉 倫 理 廉 倫 理 領 不 參 領 不 若 不 不 不 不 利 聯 行 李 聯 例 律

untitled

untitled

94年度學習障礙補救教學進階研習

untitled

untitled

第五章 實例個案

廢證相關作業

電腦組裝訓練

untitled

untitled

untitled

龍華科技大學

地方公共服務績效比較評量之探討—標竿學習策略的觀點

untitled

國立政治大學新研所碩士在職專班

大陸黨報集團化發展之研究

untitled

untitled

「UPENN牙醫學院見習及費城文藝之旅」成果報告書

地方公共服務績效比較評量之探討—標竿學習策略的觀點

個人教室 / 網路硬碟

untitled

untitled

2011台灣高中職專題暨小論文競賽

我最大的一次震驚,來自於不同區域客家人 客家人是邊陲

untitled

untitled

untitled

專 題 論 述

untitled

untitled

untitled

行政院國科會九十一年度專題研究

untitled

正確的姿勢 — 疾病疼痛不上身

untitled

人身保險業務員資格測驗方案

untitled

untitled

untitled

1

untitled

untitled

untitled

untitled

untitled

untitled

untitled

untitled

國小六年級學生對教師數學教學評量的知覺

untitled

4-04 論文封面(樣式)

untitled

untitled

untitled

九十三年第三期檔案管理工作研習營學員建議事項答覆情形彙整表

PowerPoint 簡報

臺灣地區的警察教育現況與展望

untitled

移民資料

untitled

untitled

國立陽明大學輻射防護計畫書

untitled

untitled

untitled

不可以墮胎

性別主流化簡介

Catalan Numbers簡介

untitled

untitled

untitled

untitled

untitled

編者的話

育儿的简单规则

untitled

untitled

untitled

untitled

untitled

untitled

untitled

untitled

一、

untitled

untitled

Transcription:

Inside ASP.NET 2.0- ASP.NET 1.1 2. 理念 讀 了 了 度 讀 了

理 類 來 來說 流 了 來 來 來 來 理 來 不 讀 不 不 力 來參 流 讀

了 異 行

來了 錄 行 不 了 來 了 來 行 論說 了 更 不 例 來了 力 行 樂 不 說 兩 例 利 來 了 來 樂 了 了 令 讀 來 不 不 來 了

不 旅行 令 錄 錄 來 了 例 來 利 來 ManagerProvide 不 讀

什 來 讀 來 不 來 來 了 度 不 兩 來 來 來說 不 說 BuildProvider 契 BuildProvider 了 BuildProvider BuildManager 不

BuildManager 錄.compiled.compiled Assembly 連.aspx 不 了 BuildManager 來 了 BuildProviders BuildManager 不 BuildProvider 錄 Cache 了 了 BuildProvider 不 Custom Build Provider ASP.NET 2.0 Beta Build Provider 不 2 說 2 <configuration> <system.web> <compilation>. <buildproviders> <buildprovider extension=".mafx" type="buildprovidertype, BuildProviderAssembly" /> </buildproviders> </compilation> </system.web> </configuration> Build Provider ASP.NET 2.0 Build Provider 不 了 不 更 了 不 buildprovider 不 3 3

extension BuildProvider type BuildProvider Assembly Type appliesto Code Resource Web(.aspx.ascx All 類 BuildProvider 讀 Visual Studio 2005 Beta Visual C# Express Class Library Wizard Command Line 例了 4 BuildProvider 例 4 #region Using directives using System; using System.Collections.Generic; using System.Text; using System.IO; using System.CodeDom; using System.CodeDom.Compiler; using System.Web.Compilation; #endregion namespace TestBuildProvider public class MyCSharpBuilder:BuildProvider public override void GenerateCode(AssemblyBuilder assemblybuilder) TextReader reader = base.openreader(); string scriptstring = reader.readline(); CodeCompileUnit unit = new CodeCompileUnit(); unit.namespaces.add(new CodeNamespace("TEST")); CodeTypeDeclaration class1 = new CodeTypeDeclaration("HelloClass"); class1.isclass = true; CodeMemberMethod method1 = new CodeMemberMethod(); method1.name = "SayHello"; method1.returntype = new CodeTypeReference("System.String"); method1.statements.add(new CodeMethodReturnStatement( new CodePrimitiveExpression(scriptString))); method1.attributes = MemberAttributes.Public; class1.members.add(method1); unit.namespaces[0].types.add(class1); assemblybuilder.addcodecompileunit(this, unit);

例 CodeDom HelloClass 類 SayHello 串 OpenReader TextReader 讀 來 OpenReader TextReader 來 理 例 class1.ppp( 錄 bin 錄 錄 bin 錄 行 web.config 5 5 立 class1.ppp 6 6 錄 Code 錄 Code 錄 來 BuildProvdier Default.aspx Button 7 7 Type FindType() Assembly[] assems = AppDomain.CurrentDomain.GetAssemblies(); foreach(assembly assem in assems) Type t = assem.gettype("test.helloclass"); if (t!= null) return t; return null; void Button2_Click(object sender, EventArgs e) Type t = FindType(); if (t!= null)

object obj = Activator.CreateInstance(t); string s = (string)obj.gettype().invokemember("sayhello", BindingFlags.InvokeMethod BindingFlags.Instance BindingFlags.Public, null, obj, new object[]); Button2.Text = s; FindType 了 HelloClass Type 行 BuildProvider Assemblys 裡 class1.ppp 來 Assembly HelloClass 了 FindType 來 Assemblys 來 HelloClass 連 Assembly 了 來 立 了 Reflection 了 利 Reflection 來 立 HelloClass SayHello 來 class1.ppp 不 來 不 例 易 串 source1.connectionstring = ConnectionStringsExpressionBuilder.GetConnectionString("AppConnectionString1"); 行 數 了 不行 例 #region Using directives using System; using System.Collections.Generic; using System.Text; using System.Web.Compilation;

using System.Reflection; using System.ComponentModel; using System.CodeDom; #endregion namespace TestExpressionBuilder public class MyExpressionBuilder:ExpressionBuilder public override System.CodeDom.CodeExpression GetCodeExpression(System.Web.UI.BoundPropertyEntry entry, object parseddata, ExpressionBuilderContext context) return new CodePrimitiveExpression(entry.Expression); public MyExpressionBuilder() 了 類 串 來 理 不 不 識

. 讀 NET Framework 2.0 Beta 數 Build Provider Expression Builder 了 Microsoft 不