public bool RemoveEntry(IActivityReference reference) { if (_instanceMapping == null) { return(false); } Activity activity = reference.Activity; InstanceList mappedInstances; if (!this.InstanceMapping.TryGetValue(activity, out mappedInstances)) { return(false); } if (mappedInstances.Count == 1) { this.InstanceMapping.Remove(activity); } else { mappedInstances.Remove(reference); } return(true); }
public void AddEntry(IActivityReference reference, bool skipIfDuplicate) { Activity activity = reference.Activity; if (this.InstanceMapping.TryGetValue(activity, out InstanceList mappedInstances)) { mappedInstances.Add(reference, skipIfDuplicate); } else { this.InstanceMapping.Add(activity, new InstanceList(reference)); } }
public void AddEntry(IActivityReference reference, bool skipIfDuplicate) { InstanceList list; Activity key = reference.Activity; if (this.InstanceMapping.TryGetValue(key, out list)) { list.Add(reference, skipIfDuplicate); } else { this.InstanceMapping.Add(key, new InstanceList(reference)); } }
public bool RemoveEntry(IActivityReference reference) { InstanceList list; if (this.instanceMapping == null) { return(false); } Activity key = reference.Activity; if (!this.InstanceMapping.TryGetValue(key, out list)) { return(false); } if (list.Count == 1) { this.InstanceMapping.Remove(key); } else { list.Remove(reference); } return(true); }
public void AddEntry(IActivityReference reference) { AddEntry(reference, false); }