himo

When i read about custom tracking Service

I read about ' UserTrackPoint ' ......i read these lines :

User trackpoints are similar to activity trackpoints. The only difference is that in the locations, you can be more restrictive by specifying:

  • Which object types you want to track by using ArgumentType.
  • Whether you want to match types derived from this type.

You can also specify that you want to match specific keys using KeyName. The following is a sample user trackpoint that tracks all user events .

i hope anyone knows it well tell me what theses lines means in more details .....and if u have a small sample it will be good

thx alll

hema




Re: Windows Workflow Foundation userTrackPoint

Charlie Liu - MSFT

Hi Hema:

Here is a small sample that might help you a little bit.

Suppose you have a "MyType" object on which you would like to put a user track location, then following code is what you need:

// Add a user track point

UserTrackPoint utp = new UserTrackPoint();

// Add a user location to the track point

UserTrackingLocation ul = new UserTrackingLocation();

ul.ArgumentType = typeof(MyType);

ul.ActivityType = typeof(Activity);

// This is equivalent of following line

// UserTrackingLocation ul = new UserTrackingLocation(typeof(MyType), typeof(Activity));

// If you also want to track objects that are of any derived types of MyType, this line is needed

ul.MatchDerivedArgumentTypes = true;

ul.MatchDerivedActivityTypes = true;

utp.MatchingLocations.Add(ul);






Re: Windows Workflow Foundation userTrackPoint

himo

really thx for ur reply ......

but can i ask u again :

"MyType" it is object from waht

....can u tell me more details about this object plz

and nonther thig about this line what do u mean

// If you also want to track objects that are of the derived type of MyType, this line is needed

ul.MatchDerivedArgumentTypes = true;

Iam so sorry for my annoyance ,,,but really i want to uderstand it ..

thx again

hema






Re: Windows Workflow Foundation userTrackPoint

Charlie Liu - MSFT

"MyType" could be any user-defined class such as "Order", "Person", etc. It could have derived classes. If the "MatchDerivedArgumentTypes" is set to true, it means not only objects of MyType, but also objects of its derived class type will be tracked down.