protected override void InsertItem(int index, Catch item) { if (item == null) { throw FxTrace.Exception.ArgumentNull("item"); } if (TryCatch.FindCatchActivity(item.ExceptionType, base.Items) != null) { throw FxTrace.Exception.Argument("item", System.Activities.SR.DuplicateCatchClause(item.ExceptionType.FullName)); } base.InsertItem(index, item); }
protected override void SetItem(int index, Catch item) { if (item == null) { throw FxTrace.Exception.ArgumentNull("item"); } Catch objB = TryCatch.FindCatchActivity(item.ExceptionType, base.Items); if ((objB != null) && !object.ReferenceEquals(base[index], objB)) { throw FxTrace.Exception.Argument("item", System.Activities.SR.DuplicateCatchClause(item.ExceptionType.FullName)); } base.SetItem(index, item); }
protected override void SetItem(int index, Catch item) { if (item == null) { throw FxTrace.Exception.ArgumentNull("item"); } Catch existingCatch = TryCatch.FindCatchActivity(item.ExceptionType, this.Items); if (existingCatch != null && !object.ReferenceEquals(this[index], existingCatch)) { throw FxTrace.Exception.Argument("item", SR.DuplicateCatchClause(item.ExceptionType.FullName)); } base.SetItem(index, item); }
protected override void InsertItem(int index, Catch item) { if (item == null) { throw FxTrace.Exception.ArgumentNull("item"); } Catch existingCatch = TryCatch.FindCatchActivity(item.ExceptionType, this.Items); if (existingCatch != null) { throw FxTrace.Exception.Argument("item", SR.DuplicateCatchClause(item.ExceptionType.FullName)); } base.InsertItem(index, item); }