如何从ActivityTrackingRecord中读取添加到我的活动的属性

时间:2012-10-08 20:09:13

标签: c# workflow-foundation event-tracking

我已将TypeDescriptionProvider添加到我的活动类( SequentialWorkflow )。我跟踪我有ActivityTrackingRecord条记录。记录有ActivityType,其中包含属性,但我看不到属性。如何在工作流程跟踪中从TypeDescriptionProvider读取值?

1 个答案:

答案 0 :(得分:0)

您可以将meta属性添加到您的媒体资源

[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]

样品

public static DependencyProperty TestProperty 
  = DependencyProperty.Register(
      "Test", typeof(string), typeof(YourActivity));


[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
[ValidationOption(ValidationOption.Optional)]
[Browsable(true)]
[Description("Enter ....")]
public string Test
{
   get { return ((string)(base.GetValue(YourActivity.TestProperty))); }
   set { base.SetValue(YourActivity.TestProperty, value); }
}