/// <summary> /// Reregister the order. /// </summary> /// <param name="provider">The transactional provider.</param> /// <param name="order">Order.</param> /// <param name="clone">Changes.</param> public static void ReRegisterOrderEx(this ITransactionProvider provider, Order order, Order clone) { if (provider is null) { throw new ArgumentNullException(nameof(provider)); } if (provider.IsOrderReplaceable(order) == true) { if (provider.IsOrderEditable(order) == true) { provider.EditOrder(order, clone); } else { provider.ReRegisterOrder(order, clone); } } else { provider.CancelOrder(order); provider.RegisterOrder(clone); } }