ServiceBase.RequestAdditionalTime Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
RequestAdditionalTime(Int32) |
Requests additional time for a pending operation. |
RequestAdditionalTime(TimeSpan) |
When this method is called from OnStart, OnStop, OnPause or OnContinue, the specified wait hint is passed to the Service Control Manager to avoid having the service marked as not responding. |
RequestAdditionalTime(Int32)
- Source:
- ServiceBase.cs
- Source:
- ServiceBase.cs
- Source:
- ServiceBase.cs
- Source:
- ServiceBase.cs
Requests additional time for a pending operation.
public:
void RequestAdditionalTime(int milliseconds);
public void RequestAdditionalTime (int milliseconds);
[System.Runtime.InteropServices.ComVisible(false)]
public void RequestAdditionalTime (int milliseconds);
member this.RequestAdditionalTime : int -> unit
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.RequestAdditionalTime : int -> unit
Public Sub RequestAdditionalTime (milliseconds As Integer)
Parameters
- milliseconds
- Int32
The requested time in milliseconds.
- Attributes
Exceptions
The service is not in a pending state.
Remarks
The RequestAdditionalTime method is intended to be called by the overridden OnContinue, OnPause, OnStart, or OnStop methods to request additional time for a pending operation, to prevent the Service Control Manager (SCM) from marking the service as not responding. If the pending operation is not a continue, pause, start, or stop, an InvalidOperationException is thrown.
See also
Applies to
RequestAdditionalTime(TimeSpan)
- Source:
- ServiceBase.cs
- Source:
- ServiceBase.cs
- Source:
- ServiceBase.cs
- Source:
- ServiceBase.cs
When this method is called from OnStart, OnStop, OnPause or OnContinue, the specified wait hint is passed to the Service Control Manager to avoid having the service marked as not responding.
public:
void RequestAdditionalTime(TimeSpan time);
public void RequestAdditionalTime (TimeSpan time);
member this.RequestAdditionalTime : TimeSpan -> unit
Public Sub RequestAdditionalTime (time As TimeSpan)
Parameters
- time
- TimeSpan
The requested additional time.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기