Freigeben über


PSScriptMethod Class

Definition

Serves as a method implemented with a script.

public ref class PSScriptMethod : System::Management::Automation::PSMethodInfo
public class PSScriptMethod : System.Management.Automation.PSMethodInfo
type PSScriptMethod = class
    inherit PSMethodInfo
Public Class PSScriptMethod
Inherits PSMethodInfo
Inheritance

Remarks

It is permitted to subclass PSScriptMethod but there is no established scenario for doing this, nor has it been tested.

Constructors

PSScriptMethod(String, ScriptBlock)

Initializes a new instance of PSScriptMethod.

Properties

IsInstance

True if this member has been added to the instance as opposed to coming from the adapter or from type data.

(Inherited from PSMemberInfo)
MemberType

Gets the member type.

Name

Gets the member name.

(Inherited from PSMemberInfo)
OverloadDefinitions

Gets a list of all the overloads for this method.

Script

Gets the script implementing this PSScriptMethod.

TypeNameOfValue

Gets the type of the value for this member. Currently this always returns typeof(object).FullName.

Value

Gets the value of this member. The getter returns the PSMethodInfo itself.

(Inherited from PSMethodInfo)

Methods

Copy()

Returns a new PSMemberInfo that is a copy of this PSMemberInfo.

Invoke(Object[])

Invokes Script method and returns its results.

SetMemberName(String)

Allows a derived class to set the member name...

(Inherited from PSMemberInfo)
ToString()

Returns the string representation of this member.

Applies to