关闭

Something about Distinguished Field

295人阅读 评论(0) 收藏 举报
 
Some facts with distinguished field that often confused me:
  • ·         What is a distinguished field?
Yes, it is light-weighted, it stored as xpath pointer compared to promoted property stored in message context. Yes, distinguished field is mainly used in orchestration compared to promoted properties could be used everywhere. However, distinguished field CAN be used in pipeline component as well. The namespace for it is GlobalProperties. DistinguishedFieldsNamespace (http://schemas.microsoft.com/BizTalk/2003/btsDistinguishedFields). As a reference, it could be set in pipeline component like followed code
m_msgCtx.Write(base.XPath, Globals.DistinguishedFieldsNamespace, str);
  • ·         How did its value been produced?
There is no magic of this, all BizTalk built in pipelines (except pass-through) implement a way to automatically promote the distinguished field while pipeline execution. Take XML disassemble for example, in its Disassemble method, it invokes XmlDasmReader to loop through all distinguished fields and promote them
IDictionaryEnumerator distinguishedPropertyAnnotationEnumerator = docSpecType.GetDistinguishedPropertyAnnotationEnumerator();
  • ·         What the above behavior means?
It means if you write your own disassemble pipeline component and does not deliberately promote the distinguished field by
propertyBag.Write(distField.XPath, Globals.DistinguishedFieldsNamespace,
distFieldNode.InnerText);
If you do not do this, you won’t be able to use the distinguished field in orchestration!
·         Performance wise, which is better? Promoted property or distinguished field.
Distinguished field takes the lead. Since it is rather light-weighted and much less overhead.
 
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:8872次
    • 积分:238
    • 等级:
    • 排名:千里之外
    • 原创:17篇
    • 转载:0篇
    • 译文:0篇
    • 评论:0条