/// <summary> /// Wait until or SubActivities are completed. Throw an exception on timeout. /// </summary> /// <param name="activities"></param> /// <param name="timeout"></param> public static void WaitActivities(ActivityCollection activities, int timeout) { for (int i = 0; i < activities.Count; i++) { WaitActivity(activities[i], timeout); } }
/// <summary> /// Throw an exception if one of the activities has an exception. /// </summary> /// <param name="activities"></param> public static void CheckActivitiesException(ActivityCollection activities) { for (int i = 0; i < activities.Count; i++) { CheckActivityException(activities[i]); } }
/// <summary> /// Constructor /// </summary> public ActivityBase() { mActivityCount++; Name = "Activity " + mActivityCount.ToString(); mSubActivities = new ActivityCollection(this); }
/// <summary> /// Constructor /// </summary> public ActivityBase() { int currentCount; lock (sLock) // Make sure multiple threads don't step on each other in accessing the global count. { sActivityCount++; currentCount = sActivityCount; // Cache the result so we can exit the lock. } Name = "Activity " + currentCount.ToString(); mSubActivities = new ActivityCollection(this); }
public Enumerator(ActivityCollection collection) { this.wrapped = collection.mList.GetEnumerator(); }