惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

小众软件
小众软件
B
Blog RSS Feed
美团技术团队
博客园 - 【当耐特】
C
Check Point Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
M
MIT News - Artificial intelligence
aimingoo的专栏
aimingoo的专栏
J
Java Code Geeks
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 司徒正美
T
Tailwind CSS Blog
Last Week in AI
Last Week in AI
Google DeepMind News
Google DeepMind News
D
DataBreaches.Net
人人都是产品经理
人人都是产品经理
N
Netflix TechBlog - Medium
Vercel News
Vercel News
P
Proofpoint News Feed
IT之家
IT之家
I
InfoQ
腾讯CDC
H
Hackread – Cybersecurity News, Data Breaches, AI and More

博客园 - zhanqiangz(闲云野鹤)

在ReportService2005.asmx 找不到 ReportingService2005 类 BizTalk相关的问题,打算持续更新。 恢复被格式化过的硬盘数据 BizTalk - Most possible reason for “is Delimiters are not unique” in EDI transaction What happens if BizTalk artifacts are not GACed? XmlSerializer is not trustable BizTalk - Carefully use Send Port Group BizTalk - How to debug map in VS2005 BizTalk-Get to know functoid. BizTalk - String Functoids 一辈子都忘不了的七夕节 Head First Design patterns笔记-Singleton patterns (从“一夫一妻制社会中婚约的达成”看单件模式) Global.asax文件里的Application_Init能触发吗? 使用HttpApplication实例(翻译) Head First Design patterns笔记-Decorator Patterns (从”用不同技能武装自己”看装饰模式) Head First Design patterns笔记-Observer Patterns (从TFS的Project alerts功能看观察者模式) ASP.NET 2.0的编译行为 Head First Design patterns笔记-Strategy Patterns (从不同的人使用不同的交通工具上班看策略模式) 晕菜了,TFS居然把vss里的那个rollback功能cut掉了,还好有人写了工具.
BizTalk - How to create custom functoid.
zhanqiangz(闲云野鹤) · 2008-05-29 · via 博客园 - zhanqiangz(闲云野鹤)

Functoid is no more than a piece of .Net code, find my another post BizTalk-Get to know functoid for more detail. The functoids coming with BizTalk do not always satisfy your needs. How to create our own custom functoid? In this article, I want to create a functoid which get current date/date time based on given format.

1. All functoids are derived from BaseFunctoid class which is built in Microsoft.BizTalk.BaseFunctoids.dll, it can be found under <BizTalk Installation Path>\Developer Tools.

2. BizTalk artifacts are required to be deployed in GAC, that’s to say they are strong named assemblies, we need a snk file. You can create a snk file by running sn –k sn.snk visual studio command prompt window.

3. Coding time now! Let’s create a c# class project called FunctoidDemo, include sn.snk in this project and add reference to Microsoft.BizTalk.BaseFunctoids.dll.

4. In this step we add a resource file to FunctoidDemo solution. BaseFunctoid is designed to store some settings in resource file such as functoid name, tooltip, tool description, so all derived functoid class should also have its related resource file.

 

5. The real c# code is pretty simple.

Code

6. Register FunctoidDemo.dll go GAC by running GacUtil -I FunctoidDemo.dll.

7. Copy FunctoidDemo.dll to <BizTalk Installation Path>\Developer Tools\Mapper Extensions, If you skip this step, you will get an error like this.

 

8. Add this custom functoid to tool box. NOTE: FormattedDate is the class name, it is different from assembly name.

 

9. Now add a BizTalk project to current solution for testing purpose.

 

I keep the map very simple for easy testing. The selected functoid is my custom functoid, the icon looks a little bit ugly. J I did not dray anything, just a white square, a beautiful icon does not help anything from technical perspective.

 

10. Specify the input parameter as yyyyMMdd, I want to use this pattern to format current date time.

 

11. Now I test the map with automatically generated sample file, see the output data.

 

The checkInTime is formatted as 20080529.

12. Source code download.

I will explain the structure of BaseFunctoid class in detail later.
Hope it helps!