private void ScheduleTypeLoaded(object sender, WorkflowDefinitionEventArgs args) { try { if (args.WorkflowType != null) { Activity rootActivity = ((WorkflowRuntime)sender).DefinitionDispenser.GetWorkflowDefinition(args.WorkflowType); LoadExistingScheduleType(GetScheduleTypeId(args.WorkflowType), args.WorkflowType, false, rootActivity); } else { Activity rootActivity = ((WorkflowRuntime)sender).DefinitionDispenser.GetWorkflowDefinition(args.WorkflowDefinitionHashCode); LoadExistingScheduleType(GetScheduleTypeId(args.WorkflowDefinitionHashCode), rootActivity.GetType(), false, rootActivity); } } catch { // Don't throw exceptions to the Runtime. Ignore exceptions that may occur if the debugger detaches // and closes the remoting channel. } }
private void ScheduleTypeLoaded(object sender, WorkflowDefinitionEventArgs args) { try { if (args.WorkflowType != null) { Activity workflowDefinition = ((WorkflowRuntime) sender).DefinitionDispenser.GetWorkflowDefinition(args.WorkflowType); this.LoadExistingScheduleType(this.GetScheduleTypeId(args.WorkflowType), args.WorkflowType, false, workflowDefinition); } else { Activity rootActivity = ((WorkflowRuntime) sender).DefinitionDispenser.GetWorkflowDefinition(args.WorkflowDefinitionHashCode); this.LoadExistingScheduleType(this.GetScheduleTypeId(args.WorkflowDefinitionHashCode), rootActivity.GetType(), false, rootActivity); } } catch { } }