protected virtual void OnResumeBookmark(NativeActivityContext context, Bookmark bookmark, object obj) { if (!(obj is T)) { throw new Exception("Resume Bookmark with object of type " + typeof(T).FullName); } BookmarkValue.Set(context, (T)obj); }
protected void OnResumeBookmark(NativeActivityContext context, Bookmark bookmark, object obj) { TestTraceListenerExtension listenerExtension = context.GetExtension <TestTraceListenerExtension>(); Guid instanceId = context.WorkflowInstanceId; UserTrace.Trace(listenerExtension, instanceId, BeforeWait); Thread.CurrentThread.Join((int)WaitTime.TotalMilliseconds); if (!(obj is T)) { throw new Exception("Resume Bookmark with object of type " + typeof(T).FullName); } BookmarkValue.Set(context, (T)obj); UserTrace.Trace(listenerExtension, instanceId, AfterWait); }