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
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για