Sdílet prostřednictvím


InvalidJobStateException Constructors

Definition

Overloads

InvalidJobStateException()

Creates a new instance of InvalidPSJobStateException class.

InvalidJobStateException(String)

Creates a new instance of InvalidPSJobStateException class.

InvalidJobStateException(JobState, String)

Creates a new instance of InvalidJobStateException class.

InvalidJobStateException(SerializationInfo, StreamingContext)
Obsolete.

Initializes a new instance of the InvalidPSJobStateException class with serialized data.

InvalidJobStateException(String, Exception)

Creates a new instance of InvalidPSJobStateException class.

InvalidJobStateException()

Creates a new instance of InvalidPSJobStateException class.

public:
 InvalidJobStateException();
public:
 InvalidJobStateException();
 InvalidJobStateException();
public InvalidJobStateException ();
Public Sub New ()

Applies to

InvalidJobStateException(String)

Creates a new instance of InvalidPSJobStateException class.

public:
 InvalidJobStateException(System::String ^ message);
public:
 InvalidJobStateException(Platform::String ^ message);
 InvalidJobStateException(std::wstring const & message);
public InvalidJobStateException (string message);
new System.Management.Automation.InvalidJobStateException : string -> System.Management.Automation.InvalidJobStateException
Public Sub New (message As String)

Parameters

message
String

The error message that explains the reason for the exception.

Applies to

InvalidJobStateException(JobState, String)

Creates a new instance of InvalidJobStateException class.

public:
 InvalidJobStateException(System::Management::Automation::JobState currentState, System::String ^ actionMessage);
public InvalidJobStateException (System.Management.Automation.JobState currentState, string actionMessage);
new System.Management.Automation.InvalidJobStateException : System.Management.Automation.JobState * string -> System.Management.Automation.InvalidJobStateException
Public Sub New (currentState As JobState, actionMessage As String)

Parameters

currentState
JobState

The Job State at the time of the error.

actionMessage
String

An additional message that gives more information about the error. Used for context after a generalized error message.

Applies to

InvalidJobStateException(SerializationInfo, StreamingContext)

Caution

Legacy serialization support is deprecated since .NET 8

Initializes a new instance of the InvalidPSJobStateException class with serialized data.

protected:
 InvalidJobStateException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected InvalidJobStateException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Obsolete("Legacy serialization support is deprecated since .NET 8", DiagnosticId="SYSLIB0051")]
protected InvalidJobStateException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Management.Automation.InvalidJobStateException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Management.Automation.InvalidJobStateException
[<System.Obsolete("Legacy serialization support is deprecated since .NET 8", DiagnosticId="SYSLIB0051")>]
new System.Management.Automation.InvalidJobStateException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Management.Automation.InvalidJobStateException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameters

info
SerializationInfo

The SerializationInfo that holds the serialized object data about the exception being thrown.

context
StreamingContext

The StreamingContext that contains contextual information about the source or destination.

Attributes

Applies to

InvalidJobStateException(String, Exception)

Creates a new instance of InvalidPSJobStateException class.

public:
 InvalidJobStateException(System::String ^ message, Exception ^ innerException);
public InvalidJobStateException (string message, Exception innerException);
new System.Management.Automation.InvalidJobStateException : string * Exception -> System.Management.Automation.InvalidJobStateException
Public Sub New (message As String, innerException As Exception)

Parameters

message
String

The error message that explains the reason for the exception.

innerException
Exception

The exception that is the cause of the current exception.

Applies to