Partager via


SessionState.ThrowIfNotVisible(CommandOrigin, Object) Method

Definition

Utility to check the visibility of an object based on the current command origin. If the object implements IHasSessionStateEntryVisibility then the check will be made. If the check fails, then an exception will be thrown...

public:
 static void ThrowIfNotVisible(System::Management::Automation::CommandOrigin origin, System::Object ^ valueToCheck);
public static void ThrowIfNotVisible (System.Management.Automation.CommandOrigin origin, object valueToCheck);
static member ThrowIfNotVisible : System.Management.Automation.CommandOrigin * obj -> unit
Public Shared Sub ThrowIfNotVisible (origin As CommandOrigin, valueToCheck As Object)

Parameters

origin
CommandOrigin

The command origin value to check against...

valueToCheck
Object

The object to check.

Applies to