Partilhar via


SessionStateVariableEntry Constructors

Definition

Overloads

SessionStateVariableEntry(String, Object, String)

Is used to define a variable that should be created when the runspace is opened. Note - if this object is cloned, then the clone will contain a reference to the original object not a clone of it.

SessionStateVariableEntry(String, Object, String, ScopedItemOptions)

Is used to define a variable that should be created when the runspace is opened. Note - if this object is cloned, then the clone will contain a reference to the original object not a clone of it.

SessionStateVariableEntry(String, Object, String, ScopedItemOptions, Attribute)

Is used to define a variable that should be created when the runspace is opened. Note - if this object is cloned, then the clone will contain a reference to the original object not a clone of it.

SessionStateVariableEntry(String, Object, String, ScopedItemOptions, Collection<Attribute>)

Is used to define a variable that should be created when the runspace is opened. Note - if this object is cloned, then the clone will contain a reference to the original object not a clone of it.

SessionStateVariableEntry(String, Object, String)

Is used to define a variable that should be created when the runspace is opened. Note - if this object is cloned, then the clone will contain a reference to the original object not a clone of it.

public:
 SessionStateVariableEntry(System::String ^ name, System::Object ^ value, System::String ^ description);
public:
 SessionStateVariableEntry(Platform::String ^ name, Platform::Object ^ value, Platform::String ^ description);
 SessionStateVariableEntry(std::wstring const & name, winrt::Windows::Foundation::IInspectable const & value, std::wstring const & description);
public SessionStateVariableEntry (string name, object value, string description);
new System.Management.Automation.Runspaces.SessionStateVariableEntry : string * obj * string -> System.Management.Automation.Runspaces.SessionStateVariableEntry
Public Sub New (name As String, value As Object, description As String)

Parameters

name
String

The name of the variable.

value
Object

The value to set the variable to.

description
String

A descriptive string to attach to the variable.

Applies to

SessionStateVariableEntry(String, Object, String, ScopedItemOptions)

Is used to define a variable that should be created when the runspace is opened. Note - if this object is cloned, then the clone will contain a reference to the original object not a clone of it.

public:
 SessionStateVariableEntry(System::String ^ name, System::Object ^ value, System::String ^ description, System::Management::Automation::ScopedItemOptions options);
public SessionStateVariableEntry (string name, object value, string description, System.Management.Automation.ScopedItemOptions options);
new System.Management.Automation.Runspaces.SessionStateVariableEntry : string * obj * string * System.Management.Automation.ScopedItemOptions -> System.Management.Automation.Runspaces.SessionStateVariableEntry
Public Sub New (name As String, value As Object, description As String, options As ScopedItemOptions)

Parameters

name
String

The name of the variable.

value
Object

The value to set the variable to.

description
String

A descriptive string to attach to the variable.

options
ScopedItemOptions

Options like readonly, constant, allscope, etc.

Applies to

SessionStateVariableEntry(String, Object, String, ScopedItemOptions, Attribute)

Is used to define a variable that should be created when the runspace is opened. Note - if this object is cloned, then the clone will contain a reference to the original object not a clone of it.

public:
 SessionStateVariableEntry(System::String ^ name, System::Object ^ value, System::String ^ description, System::Management::Automation::ScopedItemOptions options, Attribute ^ attribute);
public SessionStateVariableEntry (string name, object value, string description, System.Management.Automation.ScopedItemOptions options, Attribute attribute);
new System.Management.Automation.Runspaces.SessionStateVariableEntry : string * obj * string * System.Management.Automation.ScopedItemOptions * Attribute -> System.Management.Automation.Runspaces.SessionStateVariableEntry
Public Sub New (name As String, value As Object, description As String, options As ScopedItemOptions, attribute As Attribute)

Parameters

name
String

The name of the variable.

value
Object

The value to set the variable to.

description
String

A descriptive string to attach to the variable.

options
ScopedItemOptions

Options like readonly, constant, allscope, etc.

attribute
Attribute

A single attribute to attach to the variable.

Applies to

SessionStateVariableEntry(String, Object, String, ScopedItemOptions, Collection<Attribute>)

Is used to define a variable that should be created when the runspace is opened. Note - if this object is cloned, then the clone will contain a reference to the original object not a clone of it.

public:
 SessionStateVariableEntry(System::String ^ name, System::Object ^ value, System::String ^ description, System::Management::Automation::ScopedItemOptions options, System::Collections::ObjectModel::Collection<Attribute ^> ^ attributes);
public SessionStateVariableEntry (string name, object value, string description, System.Management.Automation.ScopedItemOptions options, System.Collections.ObjectModel.Collection<Attribute> attributes);
new System.Management.Automation.Runspaces.SessionStateVariableEntry : string * obj * string * System.Management.Automation.ScopedItemOptions * System.Collections.ObjectModel.Collection<Attribute> -> System.Management.Automation.Runspaces.SessionStateVariableEntry
Public Sub New (name As String, value As Object, description As String, options As ScopedItemOptions, attributes As Collection(Of Attribute))

Parameters

name
String

The name of the variable.

value
Object

The value to set the variable to.

description
String

A descriptive string to attach to the variable.

options
ScopedItemOptions

Options like readonly, constant, allscope, etc.

attributes
Collection<Attribute>

A list of attributes to attach to the variable.

Applies to