다음을 통해 공유


ICommandRuntime.WriteObject Method

Definition

Overloads

WriteObject(Object)

Called to write objects to the output pipe.

WriteObject(Object, Boolean)

Called to write one or more objects to the output pipe. If the object is a collection and the enumerateCollection flag is true, the objects in the collection will be written individually.

WriteObject(Object)

Called to write objects to the output pipe.

public:
 void WriteObject(System::Object ^ sendToPipeline);
public:
 void WriteObject(Platform::Object ^ sendToPipeline);
void WriteObject(winrt::Windows::Foundation::IInspectable const & sendToPipeline);
public void WriteObject (object sendToPipeline);
public void WriteObject (object? sendToPipeline);
abstract member WriteObject : obj -> unit
Public Sub WriteObject (sendToPipeline As Object)

Parameters

sendToPipeline
Object

The object that needs to be written. This will be written as a single object, even if it is an enumeration.

Remarks

When the cmdlet wants to write a single object out, it will call this API. It is up to the implementation to decide what to do with these objects.

Applies to

WriteObject(Object, Boolean)

Called to write one or more objects to the output pipe. If the object is a collection and the enumerateCollection flag is true, the objects in the collection will be written individually.

public:
 void WriteObject(System::Object ^ sendToPipeline, bool enumerateCollection);
public:
 void WriteObject(Platform::Object ^ sendToPipeline, bool enumerateCollection);
void WriteObject(winrt::Windows::Foundation::IInspectable const & sendToPipeline, bool enumerateCollection);
public void WriteObject (object sendToPipeline, bool enumerateCollection);
public void WriteObject (object? sendToPipeline, bool enumerateCollection);
abstract member WriteObject : obj * bool -> unit
Public Sub WriteObject (sendToPipeline As Object, enumerateCollection As Boolean)

Parameters

sendToPipeline
Object

The object that needs to be written to the pipeline.

enumerateCollection
Boolean

true if the collection should be enumerated

Remarks

When the cmdlet wants to write multiple objects out, it will call this API. It is up to the implementation to decide what to do with these objects.

Applies to