简体   繁体   中英

How can I read attributes added to my activity from ActivityTrackingRecord

I've added TypeDescriptionProvider to my activity class ( SequentialWorkflow ). I tracking I have ActivityTrackingRecord record. Record has ActivityType and in it attributes but I cannot see attribute added by me. How can I read value from TypeDescriptionProvider in workflow tracking ?

You can add meta attribute to your property

[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]

Sample

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); }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM