SlideShare a Scribd company logo
1 of 6
Reflection &Activator
HowardL
Reflection
 Reflection provides objects (of typeType) that describe assemblies,
modules and types.
 You can use reflection to dynamically create an instance of a type,
bind the type to an existing object, or get the type from an
existing object and invoke its methods or access its fields and
properties.
 If you are using attributes in your code, reflection enables you to
access them.
Console WebApi
PatentASSG
PatentABST
PatentCLAS
CPC
PatentCLAS
IPC
PatentCLMS
PatentFULL
Update Patent
DataOutside
 Console流程
 準備廠商家DB的documentIds(pn, apn, dataSource, apt, kindCode)
 透過執行Console時給的args, 決定要Create哪個Class Instance,
Constructor中會給LastSn Property目前廠商家資料庫最後一筆SN
 取用Class Instance的WebApiUrl Property的值, 決定我跟WebApi是
要甚麼資料
 取回來的資料再Invoke此Instance的方法, 做資料Insert
 最後, 批次處理全部結束後, 再Invoke另一個Instance的方法, 做刪
除舊資料(透過LastSn)
Update Patent
Data Inside
 Console流程
 準備自家DB的documentIds(pn, apn, dataSource, apt, kindCode)
 透過執行Console時給的args, 決定要Create哪個Class Instance,
Constructor中會給LastSn Property目前自家資料庫最後一筆SN
 透過執行Console時給的args, 決定哪個Class Instance(另一個專案),
並取用他的靜態方法, 模擬WebApi取資料的事
 取回來的資料再Invoke此Instance的方法, 做資料Insert
 最後, 批次處理全部結束後, 再Invoke另一個Instance的方法, 做刪
除舊資料(透過LastSn)
Reference  https://msdn.microsoft.com/zh-tw/library/ms173183.aspx

More Related Content

Viewers also liked

La fiducia c'è, la ripresa (ancora) no
La fiducia c'è, la ripresa (ancora) noLa fiducia c'è, la ripresa (ancora) no
La fiducia c'è, la ripresa (ancora) noCommerce Commercio
 
Admin.Reception Resume for Jennifer Willcox
Admin.Reception Resume for Jennifer WillcoxAdmin.Reception Resume for Jennifer Willcox
Admin.Reception Resume for Jennifer WillcoxJennifer Willcox
 
Consumi, spese obbligate, evoluzione della povertà assoluta
Consumi, spese obbligate, evoluzione della povertà assolutaConsumi, spese obbligate, evoluzione della povertà assoluta
Consumi, spese obbligate, evoluzione della povertà assolutaCommerce Commercio
 
Depenalizzazione reato omesso versamento ritenute previdenziali
Depenalizzazione reato omesso versamento ritenute previdenzialiDepenalizzazione reato omesso versamento ritenute previdenziali
Depenalizzazione reato omesso versamento ritenute previdenzialiAntonio Palmieri
 
Suply chain management
Suply chain managementSuply chain management
Suply chain managementMoonRood
 
บทที่ 1 เทคโนโลยีสารสนเทศสมัยใหม่
บทที่ 1 เทคโนโลยีสารสนเทศสมัยใหม่บทที่ 1 เทคโนโลยีสารสนเทศสมัยใหม่
บทที่ 1 เทคโนโลยีสารสนเทศสมัยใหม่noonlove09
 
เทคโนโลยีสารสนเทศสมัยใหม่
เทคโนโลยีสารสนเทศสมัยใหม่เทคโนโลยีสารสนเทศสมัยใหม่
เทคโนโลยีสารสนเทศสมัยใหม่Kob07432
 
เทคโนโลยีสาระสนเทศสมัยให
เทคโนโลยีสาระสนเทศสมัยใหเทคโนโลยีสาระสนเทศสมัยให
เทคโนโลยีสาระสนเทศสมัยใหAii Wayu
 
Curso Direito Processual Penal p/ Concurso MP-RJ
Curso Direito Processual Penal p/ Concurso MP-RJCurso Direito Processual Penal p/ Concurso MP-RJ
Curso Direito Processual Penal p/ Concurso MP-RJEstratégia Concursos
 

Viewers also liked (13)

Isomeros
IsomerosIsomeros
Isomeros
 
La fiducia c'è, la ripresa (ancora) no
La fiducia c'è, la ripresa (ancora) noLa fiducia c'è, la ripresa (ancora) no
La fiducia c'è, la ripresa (ancora) no
 
Admin.Reception Resume for Jennifer Willcox
Admin.Reception Resume for Jennifer WillcoxAdmin.Reception Resume for Jennifer Willcox
Admin.Reception Resume for Jennifer Willcox
 
Le economie regionali
Le economie regionaliLe economie regionali
Le economie regionali
 
Steven Shafer Agricultural GHG mitigation Nov 2015
Steven Shafer Agricultural GHG mitigation Nov 2015Steven Shafer Agricultural GHG mitigation Nov 2015
Steven Shafer Agricultural GHG mitigation Nov 2015
 
Vsm
VsmVsm
Vsm
 
Consumi, spese obbligate, evoluzione della povertà assoluta
Consumi, spese obbligate, evoluzione della povertà assolutaConsumi, spese obbligate, evoluzione della povertà assoluta
Consumi, spese obbligate, evoluzione della povertà assoluta
 
Depenalizzazione reato omesso versamento ritenute previdenziali
Depenalizzazione reato omesso versamento ritenute previdenzialiDepenalizzazione reato omesso versamento ritenute previdenziali
Depenalizzazione reato omesso versamento ritenute previdenziali
 
Suply chain management
Suply chain managementSuply chain management
Suply chain management
 
บทที่ 1 เทคโนโลยีสารสนเทศสมัยใหม่
บทที่ 1 เทคโนโลยีสารสนเทศสมัยใหม่บทที่ 1 เทคโนโลยีสารสนเทศสมัยใหม่
บทที่ 1 เทคโนโลยีสารสนเทศสมัยใหม่
 
เทคโนโลยีสารสนเทศสมัยใหม่
เทคโนโลยีสารสนเทศสมัยใหม่เทคโนโลยีสารสนเทศสมัยใหม่
เทคโนโลยีสารสนเทศสมัยใหม่
 
เทคโนโลยีสาระสนเทศสมัยให
เทคโนโลยีสาระสนเทศสมัยใหเทคโนโลยีสาระสนเทศสมัยให
เทคโนโลยีสาระสนเทศสมัยให
 
Curso Direito Processual Penal p/ Concurso MP-RJ
Curso Direito Processual Penal p/ Concurso MP-RJCurso Direito Processual Penal p/ Concurso MP-RJ
Curso Direito Processual Penal p/ Concurso MP-RJ
 

Similar to Reflection & activator

Ecma script edition5-小试
Ecma script edition5-小试Ecma script edition5-小试
Ecma script edition5-小试lydiafly
 
[圣思园][Java SE]Reflection
[圣思园][Java SE]Reflection[圣思园][Java SE]Reflection
[圣思园][Java SE]ReflectionArBing Xie
 
Java Script 引擎技术
Java Script 引擎技术Java Script 引擎技术
Java Script 引擎技术bigqiang zou
 
Javascript之昨是今非
Javascript之昨是今非Javascript之昨是今非
Javascript之昨是今非Tony Deng
 
深入理解Andorid重难点
深入理解Andorid重难点深入理解Andorid重难点
深入理解Andorid重难点Bin Shao
 
AWS Lambda Multi-Cloud Practices
AWS Lambda Multi-Cloud PracticesAWS Lambda Multi-Cloud Practices
AWS Lambda Multi-Cloud Practices康志強 大人
 
lwdba – 開放原始碼的輕量級資料庫存取程式庫
lwdba – 開放原始碼的輕量級資料庫存取程式庫lwdba – 開放原始碼的輕量級資料庫存取程式庫
lwdba – 開放原始碼的輕量級資料庫存取程式庫建興 王
 
Google protocol buffers简析
Google protocol buffers简析Google protocol buffers简析
Google protocol buffers简析wavefly
 
Ajax Lucence
Ajax LucenceAjax Lucence
Ajax LucenceRoger Xia
 
Abap oo
Abap ooAbap oo
Abap oovernoo
 
Java SE 7 技術手冊投影片第 15 章 - 反射器與類別載入器
Java SE 7 技術手冊投影片第 15 章 - 反射器與類別載入器Java SE 7 技術手冊投影片第 15 章 - 反射器與類別載入器
Java SE 7 技術手冊投影片第 15 章 - 反射器與類別載入器Justin Lin
 
基于Lucene的站内搜索
基于Lucene的站内搜索基于Lucene的站内搜索
基于Lucene的站内搜索fulin tang
 
基于Lucene的站内搜索
基于Lucene的站内搜索基于Lucene的站内搜索
基于Lucene的站内搜索fulin tang
 
千呼萬喚始出來的Java SE 7
千呼萬喚始出來的Java SE 7千呼萬喚始出來的Java SE 7
千呼萬喚始出來的Java SE 7javatwo2011
 
山頂洞人日記 - 回歸到最純樸的開發
山頂洞人日記 -  回歸到最純樸的開發山頂洞人日記 -  回歸到最純樸的開發
山頂洞人日記 - 回歸到最純樸的開發koji lin
 
Java华为面试题
Java华为面试题Java华为面试题
Java华为面试题yiditushe
 

Similar to Reflection & activator (20)

Ecma script edition5-小试
Ecma script edition5-小试Ecma script edition5-小试
Ecma script edition5-小试
 
[圣思园][Java SE]Reflection
[圣思园][Java SE]Reflection[圣思园][Java SE]Reflection
[圣思园][Java SE]Reflection
 
Java Script 引擎技术
Java Script 引擎技术Java Script 引擎技术
Java Script 引擎技术
 
Javascript之昨是今非
Javascript之昨是今非Javascript之昨是今非
Javascript之昨是今非
 
深入理解Andorid重难点
深入理解Andorid重难点深入理解Andorid重难点
深入理解Andorid重难点
 
Ant
AntAnt
Ant
 
AWS Lambda Multi-Cloud Practices
AWS Lambda Multi-Cloud PracticesAWS Lambda Multi-Cloud Practices
AWS Lambda Multi-Cloud Practices
 
lwdba – 開放原始碼的輕量級資料庫存取程式庫
lwdba – 開放原始碼的輕量級資料庫存取程式庫lwdba – 開放原始碼的輕量級資料庫存取程式庫
lwdba – 開放原始碼的輕量級資料庫存取程式庫
 
Google protocol buffers简析
Google protocol buffers简析Google protocol buffers简析
Google protocol buffers简析
 
Sun java
Sun javaSun java
Sun java
 
Ajax Lucence
Ajax LucenceAjax Lucence
Ajax Lucence
 
Abap oo
Abap ooAbap oo
Abap oo
 
Java SE 7 技術手冊投影片第 15 章 - 反射器與類別載入器
Java SE 7 技術手冊投影片第 15 章 - 反射器與類別載入器Java SE 7 技術手冊投影片第 15 章 - 反射器與類別載入器
Java SE 7 技術手冊投影片第 15 章 - 反射器與類別載入器
 
基于Lucene的站内搜索
基于Lucene的站内搜索基于Lucene的站内搜索
基于Lucene的站内搜索
 
基于Lucene的站内搜索
基于Lucene的站内搜索基于Lucene的站内搜索
基于Lucene的站内搜索
 
千呼萬喚始出來的Java SE 7
千呼萬喚始出來的Java SE 7千呼萬喚始出來的Java SE 7
千呼萬喚始出來的Java SE 7
 
Exodus2 大局观
Exodus2 大局观Exodus2 大局观
Exodus2 大局观
 
山頂洞人日記 - 回歸到最純樸的開發
山頂洞人日記 -  回歸到最純樸的開發山頂洞人日記 -  回歸到最純樸的開發
山頂洞人日記 - 回歸到最純樸的開發
 
Java华为面试题
Java华为面试题Java华为面试题
Java华为面试题
 
Les3
Les3Les3
Les3
 

More from LearningTech

More from LearningTech (20)

vim
vimvim
vim
 
PostCss
PostCssPostCss
PostCss
 
ReactJs
ReactJsReactJs
ReactJs
 
Docker
DockerDocker
Docker
 
Semantic ui
Semantic uiSemantic ui
Semantic ui
 
node.js errors
node.js errorsnode.js errors
node.js errors
 
Process control nodejs
Process control nodejsProcess control nodejs
Process control nodejs
 
Expression tree
Expression treeExpression tree
Expression tree
 
SQL 效能調校
SQL 效能調校SQL 效能調校
SQL 效能調校
 
flexbox report
flexbox reportflexbox report
flexbox report
 
Vic weekly learning_20160504
Vic weekly learning_20160504Vic weekly learning_20160504
Vic weekly learning_20160504
 
Peggy markdown
Peggy markdownPeggy markdown
Peggy markdown
 
Node child process
Node child processNode child process
Node child process
 
20160415ken.lee
20160415ken.lee20160415ken.lee
20160415ken.lee
 
Peggy elasticsearch應用
Peggy elasticsearch應用Peggy elasticsearch應用
Peggy elasticsearch應用
 
Expression tree
Expression treeExpression tree
Expression tree
 
Vic weekly learning_20160325
Vic weekly learning_20160325Vic weekly learning_20160325
Vic weekly learning_20160325
 
D3js learning tips
D3js learning tipsD3js learning tips
D3js learning tips
 
git command
git commandgit command
git command
 
Asp.net MVC DI
Asp.net MVC DIAsp.net MVC DI
Asp.net MVC DI
 

Reflection & activator

  • 2. Reflection  Reflection provides objects (of typeType) that describe assemblies, modules and types.  You can use reflection to dynamically create an instance of a type, bind the type to an existing object, or get the type from an existing object and invoke its methods or access its fields and properties.  If you are using attributes in your code, reflection enables you to access them.
  • 4. Update Patent DataOutside  Console流程  準備廠商家DB的documentIds(pn, apn, dataSource, apt, kindCode)  透過執行Console時給的args, 決定要Create哪個Class Instance, Constructor中會給LastSn Property目前廠商家資料庫最後一筆SN  取用Class Instance的WebApiUrl Property的值, 決定我跟WebApi是 要甚麼資料  取回來的資料再Invoke此Instance的方法, 做資料Insert  最後, 批次處理全部結束後, 再Invoke另一個Instance的方法, 做刪 除舊資料(透過LastSn)
  • 5. Update Patent Data Inside  Console流程  準備自家DB的documentIds(pn, apn, dataSource, apt, kindCode)  透過執行Console時給的args, 決定要Create哪個Class Instance, Constructor中會給LastSn Property目前自家資料庫最後一筆SN  透過執行Console時給的args, 決定哪個Class Instance(另一個專案), 並取用他的靜態方法, 模擬WebApi取資料的事  取回來的資料再Invoke此Instance的方法, 做資料Insert  最後, 批次處理全部結束後, 再Invoke另一個Instance的方法, 做刪 除舊資料(透過LastSn)

Editor's Notes

  1. Reflection提供程式在執行期間能取得其Assembly、Module、Type這些資訊的能力。 用Reflection能動態建立一個type的instance bind type到一個存在的物件 從一個存在的物件拿到他的type, 再invoke他的方法或是存取fields和properties