internal static void SubmitOperations(List<object> operations, ThrottleManager throttleManager) { List<IThrottleOperation> list = new List<IThrottleOperation>(); foreach (object obj2 in operations) { list.Add((IThrottleOperation) obj2); } throttleManager.SubmitOperations(list); }
internal static void SubmitOperations(List <object> operations, ThrottleManager throttleManager) { List <IThrottleOperation> list = new List <IThrottleOperation>(); foreach (object obj2 in operations) { list.Add((IThrottleOperation)obj2); } throttleManager.SubmitOperations(list); }
internal static void SubmitOperations(List <object> operations, ThrottleManager throttleManager) { List <IThrottleOperation> newOperations = new List <IThrottleOperation>(); foreach (object operation in operations) { newOperations.Add((IThrottleOperation)operation); } throttleManager.SubmitOperations(newOperations); }
internal static void SubmitOperations(List<object> operations, ThrottleManager throttleManager) { List<IThrottleOperation> newOperations = new List<IThrottleOperation>(); foreach (object operation in operations) { newOperations.Add((IThrottleOperation)operation); } throttleManager.SubmitOperations(newOperations); }
private void SubmitAndWaitForConnect(List<IThrottleOperation> connectJobOperations) { using (ThrottleManager manager = new ThrottleManager()) { EventHandler<EventArgs> handler2 = null; using (ManualResetEvent connectResult = new ManualResetEvent(false)) { if (handler2 == null) { handler2 = (sender, eventArgs) => connectResult.Set(); } EventHandler<EventArgs> handler = handler2; manager.ThrottleComplete += handler; try { manager.ThrottleLimit = 0; manager.SubmitOperations(connectJobOperations); manager.EndSubmitOperations(); connectResult.WaitOne(); } finally { manager.ThrottleComplete -= handler; } } } }