C# Класс TonyBaloney.St2.Client.PowerShell.SessionStateExtensions

Extension methods for working with PowerShell SessionState.
TODO: Add getter / setter for default connection.
Показать файл Открыть проект

Открытые методы

Метод Описание
AddServiceConnection ( this sessionState, string connectionName, St2ClientConnection connection ) : St2ClientConnection

A SessionState extension method that adds a service connection.

GetDefaultServiceConnection ( this sessionState ) : St2ClientConnection

A SessionState extension method that gets default service connection.

GetServiceConnectionByName ( this sessionState, string name ) : St2ClientConnection

A SessionState extension method that gets service connection by name.

GetServiceConnections ( this sessionState ) : St2ClientConnection>.IReadOnlyDictionary

A SessionState extension method that gets service connections.

RemoveServiceConnection ( this sessionState, string connectionName ) : bool

A SessionState extension method that removes the service connection.

SetDefaultServiceConnection ( this sessionState, string connectionName ) : void

A SessionState extension method that sets default service connection.

Приватные методы

Метод Описание
GetServiceConnectionsFromSession ( System.Management.Automation.SessionState sessionState ) : St2ClientConnection>.Dictionary

Gets service connections from session.

Описание методов

AddServiceConnection() публичный статический Метод

A SessionState extension method that adds a service connection.
Thrown when one or more required arguments are null.
public static AddServiceConnection ( this sessionState, string connectionName, St2ClientConnection connection ) : St2ClientConnection
sessionState this .
connectionName string The connection Name.
connection St2ClientConnection The connection.
Результат St2ClientConnection

GetDefaultServiceConnection() публичный статический Метод

A SessionState extension method that gets default service connection.
public static GetDefaultServiceConnection ( this sessionState ) : St2ClientConnection
sessionState this .
Результат St2ClientConnection

GetServiceConnectionByName() публичный статический Метод

A SessionState extension method that gets service connection by name.
Thrown when one or more required arguments are null.
public static GetServiceConnectionByName ( this sessionState, string name ) : St2ClientConnection
sessionState this .
name string The name.
Результат St2ClientConnection

GetServiceConnections() публичный статический Метод

A SessionState extension method that gets service connections.
public static GetServiceConnections ( this sessionState ) : St2ClientConnection>.IReadOnlyDictionary
sessionState this .
Результат St2ClientConnection>.IReadOnlyDictionary

RemoveServiceConnection() публичный статический Метод

A SessionState extension method that removes the service connection.
Thrown when one or more required arguments are null.
public static RemoveServiceConnection ( this sessionState, string connectionName ) : bool
sessionState this .
connectionName string The connection Name.
Результат bool

SetDefaultServiceConnection() публичный статический Метод

A SessionState extension method that sets default service connection.
Thrown when the index is outside the required /// range.
public static SetDefaultServiceConnection ( this sessionState, string connectionName ) : void
sessionState this .
connectionName string The connection Name.
Результат void