导航

.NET Class消息类型

Posted on 2008-12-11 16:15  鸡尾虾的壳  阅读(162)  评论(0)    收藏  举报

例子:
   [Serializable]
   public class MsgClass
   {
      [PropertyAttribute(typeof(PropertySchemaForClass.Property2))]
      [DistinguishedFieldAttribute()]
      public String StrField;

      [DistinguishedFieldAttribute()]
      public int IntField;
   }
   定义Namespace为“PropertySchemaForClass”的Property Schema,其中包含"Property2"的Property。并在Class Project中添加对它的dll引用。
   类申明为[Serializable]。
  
   StrField与"Property2"建立了Promote Binding关系。
   StrField,IntField都属于DistinguishedField。

   在Orchestration中,申明MsgClass类型的消息。在Message Assign Shape中,先调用MsgClass类的构造函数,然后给类属性赋值。