Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/System.Management.Automation/engine/MshCommandRuntime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public void WriteObject(object sendToPipeline, bool enumerateCollection)

#if CORECLR
// SecurityContext is not supported in CoreCLR
DoWriteObjects(sendToPipeline);
DoWriteEnumeratedObject(sendToPipeline);
#else
if (UseSecurityContextRun)
{
Expand Down Expand Up @@ -278,11 +278,11 @@ public void WriteObject(object sendToPipeline, bool enumerateCollection)
/// <exception cref="System.InvalidOperationException">
/// Not permitted at this time or from this thread
/// </exception>
private void DoWriteObjects(object sendToPipeline)
private void DoWriteEnumeratedObject(object sendToPipeline)
{
// NOTICE-2004/06/08-JonN 959638
ThrowIfWriteNotPermitted(true);
_WriteObjectsSkipAllowCheck(sendToPipeline);
_EnumerateAndWriteObjectSkipAllowCheck(sendToPipeline);
}
// Trust: public void WriteObject(object sendToPipeline, DataTrustCategory trustCategory); // enumerateCollection defaults to false
// Trust: public void WriteObject(object sendToPipeline, bool enumerateCollection, DataTrustCategory trustCategory);
Expand Down Expand Up @@ -2591,7 +2591,7 @@ internal void _WriteObjectSkipAllowCheck(object sendToPipeline)
/// The Cmdlet should generally just allow PipelineStoppedException
/// to percolate up to the caller of ProcessRecord etc.
/// </exception>
internal void _WriteObjectsSkipAllowCheck(object sendToPipeline)
internal void _EnumerateAndWriteObjectSkipAllowCheck(object sendToPipeline)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
internal void _EnumerateAndWriteObjectSkipAllowCheck(object sendToPipeline)
internal void EnumerateAndWriteObjectSkipAllowCheck(object sendToPipeline)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I go that route it might be better to just rename half the things in this file, in all honesty... There are a lot of similarly questionable names here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, no. It is better to spend time to create something useful.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll come back to it when I'm really bored and do a proper style pass over the whole thing. 😉

Not a big-ticket item, but there's a lot of room for tidying up in this one. 😄

{
IEnumerable enumerable = LanguagePrimitives.GetEnumerable(sendToPipeline);
if (enumerable == null)
Expand Down