public void Reset() { _visible = false; _keyLimit = 0; _ignoreBackSpace = false; _recognizeModifiedKeystrockes = false; catchedText = ""; endKeyReason = Keys.None; abortReason = AbortReason.Fail; isCatching = false; catchingLock = new object(); _timeout = 0; _ignoreIAGeneratedInput = false; _endkeys.Clear(); _endMatchings.Clear(); _caseSensitive = false; _findAnywhere = false; if (_timeoutTimer != null) { _timeoutTimer.Dispose(); } }
/// <summary> /// Aborts a currently managed resource transfer. /// </summary> /// <param name="transferId">Identifies the transfer and resource.</param> /// <param name="reason">The reason to cancel the transfer.</param> /// <returns>The new status of the transfer, which is <see cref="TransferStatus.Aborted"/> /// in case of a known transfer. If the transfer is not known (maybe because it was aborted /// by the system), this method returns <see cref="TransferStatus.UnknownTransfer"/>.</returns> public virtual TransferStatus CancelTransfer(string transferId, AbortReason reason) { var context = IsUploadService ? FileSystemTask.UploadTransferCanceling : FileSystemTask.DownloadTransferCanceling; return(CloseTransferInternal(transferId, TransferStatus.Aborted, reason, context, AuditEvent.TransferCanceled)); }
// Token: 0x060016F3 RID: 5875 RVA: 0x00028264 File Offset: 0x00027264 public virtual void Abort(AbortReason reason) { foreach (EntrantInfo entrantInfo in this.Entrants) { if (!entrantInfo.ScoringState.HasFinishReason) { entrantInfo.ScoringState.FinishReason = FinishReason.Aborted; } } }
/// <summary> /// Checks if we are done with logging. /// </summary> /// <param name="e"></param> /// <returns></returns> bool PostAbortCondition(IAKeyEventArgs e) { if (Endkeys.Contains(e.Keys)) { endKeyReason = e.Keys; abortReason = AbortReason.EndKey; return(true); } return(false); }
/// <summary> /// Aborts the underlying transaction /// </summary> /// <param name="reason">The reason for the abort</param> public void Abort(AbortReason reason) { lock(_lock) { if (_transaction != null) _abortReason = reason; else _transaction.Abort(reason); } }
/// <summary> /// Sends an abort message /// </summary> /// <param name="reason">The abort reason</param> private void _sendAbort(AbortReason reason) { AbortMessage message = new AbortMessage(); message.AbortReason = (byte)reason; message.InvokeId = _invokeId; message.Server = false; _host.SendRaw(_device.Address, true, message, BufferSegment.Empty); }
public static void SendAbort(Association asc, AbortSource abortSource = AbortSource.DICOM_UL_SERV_PROVIDER, AbortReason reason = AbortReason.REASON_NOT_SPECIFIED) { if (asc.Stream.CanWrite) { var abort = new Abort { Source = abortSource, Reason = reason }; var message = abort.Write(); asc.Stream.Write(message, 0, message.Length); } }
/// <summary> /// Aborts the transaction /// </summary> public void Abort(AbortReason reason) { lock (_lock) { if (_state != ClientState.GetDeviceInfo) { _sendAbort(reason); } _handle.FeedAbort(reason); _transitionTo(ClientState.Disposed); } }
/// <summary> /// ボナンザを停止します。 /// </summary> public void Abort(AbortReason reason, int millis = 500) { using (LazyLock()) { this.aborted = true; // 初期化されていなければ、そのまま帰ります。 if (!this.initialized) { return; } WriteCommand("quit"); // ボナンザプロセスを終了します。 var process = this.bonaProcess; if (process != null) { if (!process.WaitForExit(millis)) { process.Kill(); } this.bonaProcess = null; } if (this.writeThread != null) { this.writeThread.Join(0); this.writeThread = null; } if (this.readThread != null) { this.readThread.Join(0); this.readThread = null; } if (this.errorReadThread != null) { this.errorReadThread.Join(0); this.errorReadThread = null; } this.initialized = false; IsConnected = false; AbortedReason = reason; } Aborted.SafeRaiseEvent(this, new BonanzaAbortedEventArgs(reason)); }
/// <summary> /// Checks if we are done with logging. /// </summary> /// <returns></returns> bool PastAbortCondition(IAKeyEventArgs e) { // Past Condition: Key Limit if (KeyLimit != 0) { if (catchedText.Length >= KeyLimit) { abortReason = AbortReason.Max; return(true); } } bool abort = false; // Past Condition Matchlist foreach (var match in _endMatchings) { if (CaseSensitive) { if (!FindAnyWhere && match == catchedText) { abort = true; } if (FindAnyWhere && catchedText.Contains(match)) { abort = true; } } else { if (!FindAnyWhere && match.Equals(catchedText, StringComparison.OrdinalIgnoreCase)) { abort = true; } if (FindAnyWhere && catchedText.ToLowerInvariant().Contains(match.ToLowerInvariant())) { abort = true; } } if (abort) { break; } } if (abort) { abortReason = AbortReason.Match; } return(abort); }
/// <summary> /// Aborts the underlying transaction /// </summary> /// <param name="reason">The reason for the abort</param> public void Abort(AbortReason reason) { lock (_lock) { if (_transaction != null) { _abortReason = reason; } else { _transaction.Abort(reason); } } }
/// <summary> /// Aborts a currently managed resource transfer. /// </summary> /// <param name="transferId">Identifies the transfer and resource.</param> /// <param name="reason">The reason to cancel the transfer.</param> /// <returns>The new status of the transfer, which is <see cref="TransferStatus.Aborted"/> /// in case of a known transfer. If the transfer is not known (maybe because it was aborted /// by the system), this method returns <see cref="TransferStatus.UnknownTransfer"/>.</returns> /// <exception cref="UnknownTransferException">In case the <paramref name="transferId"/> /// does not refer to an active transfer.</exception> public TransferStatus CancelTransfer(string transferId, AbortReason reason) { string actionUri = GetCancelTransferRequestUri(); actionUri = actionUri.ConstructUri(Uris.PatternTransferId, transferId); actionUri = actionUri.ConstructUri(Uris.PatternAbortReason, reason.ToString()); var wrapped = SecurePost <Wrapped <TransferStatus> >(GetCancelTransferRequestContext(), actionUri, HttpContent.CreateEmpty(), () => String.Format("Could not cancel transfer [{0}].", transferId)); return(wrapped.Value); }
public override long Read(Stream stream) { long bytes = 0; if (stream.CanRead) { EndianBinaryReader reader = new EndianBinaryReader(stream, Endian.Big); long start = stream.Position; type = (ProtocolDataUnit.Type)reader.ReadByte(); reserved1 = reader.ReadByte(); length = reader.ReadInt32(); reserved2 = reader.ReadByte(); reserved3 = reader.ReadByte(); source = (AbortSource)reader.ReadByte(); reason = (AbortReason)reader.ReadByte(); bytes = stream.Position - start; } return(bytes); }
/// <summary> /// Aborts the association. /// </summary> internal void Abort(AbortSource source, AbortReason reason) { AssertValid(); if (!IsOpen()) { throw new Exception("Association not open."); } // the exception should be thrown on the foreground service thread abortexception = new AssociationAbortedException(source, reason, "Association aborted at the client's request."); State = State.Aborted; // the association is aborted, free any services awaiting respsonses foreach (ServiceClass service in services) { service.completeEvent.Set(); } AssociateAbortPdu abort = new AssociateAbortPdu(); abort.Source = source; abort.reason = reason; Send("A-ABORT", abort); }
/// <summary> /// Notifies the handle that the transaction /// has been aborted /// </summary> /// <param name="reason">The abort reason</param> public override void FeedAbort(AbortReason reason) { _source.SetException(new AbortException(reason)); }
public AbortInformation(AbortReason reason, Keys endkey, string catchedText) { Reason = reason; EndKey = endkey; CatchedText = catchedText; }
public void OnNetworkError(IClientService nwClientSrvc, string msg, AbortSource abortSource, AbortReason abortReason, Object userCookie) { if (abortSource == AbortSource.Server) { (userCookie as TransactionCookie).Log("Network Error: Server not responding"); } else if (abortSource == AbortSource.Client) { (userCookie as TransactionCookie).Log("Network Error: Your device isn't connected to a network"); } }
/// <inheritdoc cref="Command.FeatureAbort"/> /// <param name="device">The device.</param> /// <param name="destination">The destination address.</param> /// <param name="opCode">The command being aborted.</param> /// <param name="reason">The abort reason.</param> /// <returns>A <see cref="CecMessage"/> object representing the command.</returns> public static CecMessage FeatureAbort(this CecDevice device, LogicalAddress destination, Command opCode, AbortReason reason) { return(CecMessageBuilder.FeatureAbort(device.LogicalAddress, destination, opCode, reason)); }
/// <summary> /// Notifies the handle that the transaction /// has been aborted /// </summary> /// <param name="reason">The abort reason</param> public abstract void FeedAbort(AbortReason reason);
/// <summary> /// Constructs a new abort exception instance /// </summary> /// <param name="reason">The abort reason</param> public AbortException(AbortReason reason) { this.Reason = reason; }
/// <summary> /// Aborts a currently managed resource transfer. /// </summary> /// <param name="transferId">Identifies the transfer and resource.</param> /// <param name="reason">The reason to cancel the transfer.</param> /// <returns>The new status of the transfer, which is <see cref="TransferStatus.Aborted"/> /// in case of a known transfer. If the transfer is not known (maybe because it was aborted /// by the system), this method returns <see cref="TransferStatus.UnknownTransfer"/>.</returns> /// <exception cref="UnknownTransferException">In case the <paramref name="transferId"/> /// does not refer to an active transfer.</exception> protected override TransferStatus CancelTransferImpl(string transferId, AbortReason reason) { return(ReaderService.CancelTransfer(transferId, reason)); }
/// <summary> /// Aborts a currently managed resource transfer. /// </summary> /// <param name="transferId">Identifies the transfer and resource.</param> /// <param name="reason">The reason to cancel the transfer.</param> /// <returns>The new status of the transfer, which is <see cref="TransferStatus.Aborted"/> /// in case of a known transfer. If the transfer is not known (maybe because it was aborted /// by the system), this method returns <see cref="TransferStatus.UnknownTransfer"/>.</returns> /// <exception cref="UnknownTransferException">In case the <paramref name="transferId"/> /// does not refer to an active transfer.</exception> TransferStatus IFSWriterService.CancelTransfer(string transferId, AbortReason reason) { return(FaultUtil.SecureFunc(FileSystemTask.UploadTransferCanceling, () => Decorated.UploadTransfers.CancelTransfer(transferId, reason))); }
/// <summary> /// Aborts a currently managed resource transfer. /// </summary> /// <param name="transferId">Identifies the transfer and resource.</param> /// <param name="reason">The reason to cancel the transfer.</param> /// <returns>The new status of the transfer, which is <see cref="TransferStatus.Aborted"/> /// in case of a known transfer. If the transfer is not known (maybe because it was aborted /// by the system), this method returns <see cref="TransferStatus.UnknownTransfer"/>.</returns> /// <exception cref="UnknownTransferException">In case the <paramref name="transferId"/> /// does not refer to an active transfer.</exception> TransferStatus IFSWriterService.CancelTransfer(string transferId, AbortReason reason) { return FaultUtil.SecureFunc(FileSystemTask.UploadTransferCanceling, () => Decorated.UploadTransfers.CancelTransfer(transferId, reason)); }
public virtual OperationResult<Wrapped<TransferStatus>> Post(string transferId, AbortReason reason) { return SecureFunc(() => new Wrapped<TransferStatus>(Uploads.CancelTransfer(transferId, reason))); }
/// <summary> /// Aborts a currently managed resource transfer. /// </summary> /// <param name="transferId">Identifies the transfer and resource.</param> /// <param name="reason">The reason to cancel the transfer.</param> public void CancelTransfer(string transferId, AbortReason reason) { CloseTransferInternal(transferId, TransferStatus.Aborted, reason); }
public override TransferStatus CancelTransfer(string transferId, AbortReason reason) { return(base.CancelTransfer(transferId, reason)); }
public virtual OperationResult <Wrapped <TransferStatus> > Post(string transferId, AbortReason reason) { return(SecureFunc(() => new Wrapped <TransferStatus>(Uploads.CancelTransfer(transferId, reason)))); }
/// <summary> /// Aborts a currently managed resource transfer. /// </summary> /// <param name="transferId">Identifies the transfer and resource.</param> /// <param name="reason">The reason to cancel the transfer.</param> /// <returns>The new status of the transfer, which is <see cref="TransferStatus.Aborted"/> /// in case of a known transfer. If the transfer is not known (maybe because it was aborted /// by the system), this method returns <see cref="TransferStatus.UnknownTransfer"/>.</returns> /// <exception cref="UnknownTransferException">In case the <paramref name="transferId"/> /// does not refer to an active transfer.</exception> public TransferStatus CancelTransfer(string transferId, AbortReason reason) { return(SecureFunc(FileSystemTask.ProviderMetaDataRequest, () => CancelTransferImpl(transferId, reason), () => String.Format("Could not cancel transfer [{0}].", transferId))); }
/// <summary> /// コンストラクタ /// </summary> public BonanzaAbortedEventArgs(AbortReason reason) { Reason = reason; }
/// <summary> /// Aborts a currently managed resource transfer. /// </summary> /// <param name="transferId">Identifies the transfer and resource.</param> /// <param name="reason">The reason to cancel the transfer.</param> /// <returns>The new status of the transfer, which is <see cref="TransferStatus.Aborted"/> /// in case of a known transfer. If the transfer is not known (maybe because it was aborted /// by the system), this method returns <see cref="TransferStatus.UnknownTransfer"/>.</returns> /// <exception cref="UnknownTransferException">In case the <paramref name="transferId"/> /// does not refer to an active transfer.</exception> protected abstract TransferStatus CancelTransferImpl(string transferId, AbortReason reason);
/// <summary> /// Aborts the association with a reason. /// </summary> public void Abort(AbortReason reason) { Abort(AbortSource.ServiceUser, reason); }
/// <summary> /// Aborts the transaction /// </summary> public void Abort(AbortReason reason) { lock(_lock) { if(_state != ClientState.GetDeviceInfo) _sendAbort(reason); _handle.FeedAbort(reason); _transitionTo(ClientState.Disposed); } }
/// <summary> /// Aborts a currently managed resource transfer. /// </summary> /// <param name="transferId">Identifies the transfer and resource.</param> /// <param name="reason">The reason to cancel the transfer.</param> /// <returns>The new status of the transfer, which is <see cref="TransferStatus.Aborted"/> /// in case of a known transfer. If the transfer is not known (maybe because it was aborted /// by the system), this method returns <see cref="TransferStatus.UnknownTransfer"/>.</returns> /// <exception cref="UnknownTransferException">In case the <paramref name="transferId"/> /// does not refer to an active transfer.</exception> protected override TransferStatus CancelTransferImpl(string transferId, AbortReason reason) { return WriterService.CancelTransfer(transferId, reason); }
public AbortInformation() { Reason = AbortReason.Fail; EndKey = Keys.None; CatchedText = ""; }
public virtual TransferStatus CancelTransfer(string transferId, AbortReason reason) { return(TransferHandler.CancelTransfer(transferId, reason)); }
public void AbortCatching() { abortReason = AbortReason.NewInput; CatchingDone(); }