Fix docs comments in utility folder (#7192)

This commit is contained in:
Ilya 2018-07-17 10:07:16 +05:00 committed by GitHub
parent 0a2f9c8821
commit a3786158ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
114 changed files with 1066 additions and 1351 deletions

View file

@ -29,7 +29,7 @@ namespace Microsoft.PowerShell.Commands
private PSObject _inputObject;
/// <summary>
/// The object to add a member to
/// The object to add a member to.
/// </summary>
[Parameter(Mandatory = true, ValueFromPipeline = true, ParameterSetName = "MemberSet")]
[Parameter(Mandatory = true, ValueFromPipeline = true, ParameterSetName = "TypeNameSet")]
@ -43,7 +43,7 @@ namespace Microsoft.PowerShell.Commands
private PSMemberTypes _memberType;
/// <summary>
/// The member type of to be added
/// The member type of to be added.
/// </summary>
[Parameter(Mandatory = true, Position = 0, ParameterSetName = "MemberSet")]
[Alias("Type")]
@ -55,7 +55,7 @@ namespace Microsoft.PowerShell.Commands
private string _memberName;
/// <summary>
/// The name of the new member
/// The name of the new member.
/// </summary>
[Parameter(Mandatory = true, Position = 1, ParameterSetName = "MemberSet")]
public string Name
@ -66,8 +66,7 @@ namespace Microsoft.PowerShell.Commands
private object _value1 = s_notSpecified;
/// <summary>
/// First value of the new member. The meaning of this value
/// changes according to the member type.
/// First value of the new member. The meaning of this value changes according to the member type.
/// </summary>
[Parameter(Position = 2, ParameterSetName = "MemberSet")]
public object Value
@ -78,8 +77,7 @@ namespace Microsoft.PowerShell.Commands
private object _value2 = s_notSpecified;
/// <summary>
/// Second value of the new member. The meaning of this value
/// changes according to the member type.
/// Second value of the new member. The meaning of this value changes according to the member type.
/// </summary>
[Parameter(Position = 3, ParameterSetName = "MemberSet")]
public object SecondValue
@ -90,7 +88,7 @@ namespace Microsoft.PowerShell.Commands
private string _typeName;
/// <summary>
/// Add new type name to the specified object for TypeNameSet
/// Add new type name to the specified object for TypeNameSet.
/// </summary>
[Parameter(Mandatory = true, ParameterSetName = "TypeNameSet")]
[Parameter(ParameterSetName = "MemberSet")]
@ -105,7 +103,7 @@ namespace Microsoft.PowerShell.Commands
private bool _force;
/// <summary>
/// True if we should overwrite a possibly existing member
/// True if we should overwrite a possibly existing member.
/// </summary>
[Parameter(ParameterSetName = "MemberSet")]
[Parameter(ParameterSetName = NotePropertySingleMemberSet)]
@ -117,9 +115,9 @@ namespace Microsoft.PowerShell.Commands
}
private bool _passThru /* = false */;
/// <summary>
/// Gets or sets the parameter -passThru which states output from
/// the command should be placed in the pipeline.
/// Gets or sets the parameter -passThru which states output from the command should be placed in the pipeline.
/// </summary>
[Parameter(ParameterSetName = "MemberSet")]
[Parameter(ParameterSetName = "TypeNameSet")]
@ -138,7 +136,7 @@ namespace Microsoft.PowerShell.Commands
private string _notePropertyName;
/// <summary>
/// The name of the new NoteProperty member
/// The name of the new NoteProperty member.
/// </summary>
[Parameter(Mandatory = true, Position = 0, ParameterSetName = NotePropertySingleMemberSet)]
[ValidateNotePropertyNameAttribute()]
@ -152,7 +150,7 @@ namespace Microsoft.PowerShell.Commands
private object _notePropertyValue;
/// <summary>
/// The value of the new NoteProperty member
/// The value of the new NoteProperty member.
/// </summary>
[Parameter(Mandatory = true, Position = 1, ParameterSetName = NotePropertySingleMemberSet)]
[AllowNull]
@ -164,8 +162,9 @@ namespace Microsoft.PowerShell.Commands
// Use IDictionary to support both Hashtable and OrderedHashtable
private IDictionary _property;
/// <summary>
/// The NoteProperty members to be set
/// The NoteProperty members to be set.
/// </summary>
[Parameter(Mandatory = true, Position = 0, ParameterSetName = NotePropertyMultiMemberSet)]
[ValidateNotNullOrEmpty]
@ -330,7 +329,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// This method implements the ProcessRecord method for add-member command
/// This method implements the ProcessRecord method for add-member command.
/// </summary>
protected override void ProcessRecord()
{
@ -431,7 +430,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Add the member to the target object
/// Add the member to the target object.
/// </summary>
/// <param name="member"></param>
/// <returns></returns>
@ -467,7 +466,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Process the 'NotePropertyMultiMemberSet' parameter set
/// Process the 'NotePropertyMultiMemberSet' parameter set.
/// </summary>
private void ProcessNotePropertyMultiMemberSet()
{
@ -526,12 +525,11 @@ namespace Microsoft.PowerShell.Commands
/// So when given a string or a number that can be converted, we make sure it gets
/// bound to -MemberType, instead of -NotePropertyName.
/// </summary>
///
/// <remarks>
/// This exception will be hidden in the positional binding phase. So we make sure
/// if the argument can be converted to PSMemberTypes, it gets bound to the -MemberType
/// parameter. We are sure that when this exception is thrown, the current positional
/// argument can be successfully bound to
/// argument can be successfully bound to.
/// </remarks>
private sealed class ValidateNotePropertyNameAttribute : ValidateArgumentsAttribute
{
@ -561,7 +559,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Transform the integer arguments to strings for the parameter NotePropertyName
/// Transform the integer arguments to strings for the parameter NotePropertyName.
/// </summary>
internal sealed class NotePropertyTransformationAttribute : ArgumentTransformationAttribute
{
@ -578,4 +576,3 @@ namespace Microsoft.PowerShell.Commands
}
}
}

View file

@ -19,14 +19,14 @@ namespace Microsoft.PowerShell.Commands
#region BaseCsvWritingCommand
/// <summary>
/// This class implements the base for exportcsv and converttocsv commands
/// This class implements the base for exportcsv and converttocsv commands.
/// </summary>
public abstract class BaseCsvWritingCommand : PSCmdlet
{
#region Command Line Parameters
/// <summary>
/// Property that sets delimiter
/// Property that sets delimiter.
/// </summary>
[Parameter(Position = 1, ParameterSetName = "Delimiter")]
[ValidateNotNull]
@ -54,7 +54,7 @@ namespace Microsoft.PowerShell.Commands
public SwitchParameter UseCulture { get; set; }
/// <summary>
/// Abstract Property - Input Object which is written in Csv format
/// Abstract Property - Input Object which is written in Csv format.
/// Derived as Different Attributes.In ConvertTo-CSV, This is a positional parameter. Export-CSV not a Positional behaviour.
/// </summary>
@ -81,14 +81,14 @@ namespace Microsoft.PowerShell.Commands
#endregion Command Line Parameters
/// <summary>
/// Write the string to a file or pipeline
/// Write the string to a file or pipeline.
/// </summary>
public virtual void WriteCsvLine(string line)
{
}
/// <summary>
/// BeginProcessing override
/// BeginProcessing override.
/// </summary>
protected override void BeginProcessing()
{
@ -110,7 +110,7 @@ namespace Microsoft.PowerShell.Commands
#region Export-CSV Command
/// <summary>
/// implementation for the export-csv command
/// Implementation for the export-csv command.
/// </summary>
[Cmdlet(VerbsData.Export, "Csv", SupportsShouldProcess = true, DefaultParameterSetName = "Delimiter", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113299")]
public sealed class ExportCsvCommand : BaseCsvWritingCommand, IDisposable
@ -127,7 +127,7 @@ namespace Microsoft.PowerShell.Commands
public override PSObject InputObject { get; set; }
/// <summary>
/// mandatory file name to write to
/// Mandatory file name to write to.
/// </summary>
[Parameter(Position = 0)]
[ValidateNotNullOrEmpty]
@ -147,7 +147,7 @@ namespace Microsoft.PowerShell.Commands
private bool _specifiedPath = false;
/// <summary>
/// The literal path of the mandatory file name to write to
/// The literal path of the mandatory file name to write to.
/// </summary>
[Parameter()]
[ValidateNotNullOrEmpty]
@ -203,7 +203,7 @@ namespace Microsoft.PowerShell.Commands
private bool _noclobber;
/// <summary>
/// Encoding optional flag
/// Encoding optional flag.
/// </summary>
[Parameter()]
[ArgumentToEncodingTransformationAttribute()]
@ -238,7 +238,7 @@ namespace Microsoft.PowerShell.Commands
private ExportCsvHelper _helper;
/// <summary>
/// BeginProcessing override
/// BeginProcessing override.
/// </summary>
protected override void BeginProcessing()
{
@ -261,7 +261,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Convert the current input object to Csv and write to file/WriteObject
/// Convert the current input object to Csv and write to file/WriteObject.
/// </summary>
protected override
void
@ -301,7 +301,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// EndProcessing
/// EndProcessing.
/// </summary>
protected override void EndProcessing()
{
@ -313,17 +313,17 @@ namespace Microsoft.PowerShell.Commands
#region file
/// <summary>
/// handle to file stream
/// Handle to file stream.
/// </summary>
private FileStream _fs;
/// <summary>
/// stream writer used to write to file
/// Stream writer used to write to file.
/// </summary>
private StreamWriter _sw = null;
/// <summary>
/// handle to file whose read-only attribute should be reset when we are done
/// Handle to file whose read-only attribute should be reset when we are done.
/// </summary>
private FileInfo _readOnlyFileInfo = null;
@ -458,7 +458,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Write the csv line to file
/// Write the csv line to file.
/// </summary>
/// <param name="line"></param>
public override void
@ -477,12 +477,12 @@ namespace Microsoft.PowerShell.Commands
#region IDisposable Members
/// <summary>
/// Set to true when object is disposed
/// Set to true when object is disposed.
/// </summary>
private bool _disposed;
/// <summary>
/// public dispose method
/// Public dispose method.
/// </summary>
public
void
@ -503,7 +503,7 @@ namespace Microsoft.PowerShell.Commands
#region Import-CSV Command
/// <summary>
/// Implements Import-Csv command
/// Implements Import-Csv command.
/// </summary>
[Cmdlet(VerbsData.Import, "Csv", DefaultParameterSetName = "Delimiter", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113341")]
public sealed
@ -513,14 +513,14 @@ namespace Microsoft.PowerShell.Commands
#region Command Line Parameters
/// <summary>
/// Property that sets delimiter
/// Property that sets delimiter.
/// </summary>
[Parameter(Position = 1, ParameterSetName = "Delimiter")]
[ValidateNotNull]
public char Delimiter { get; set; }
/// <summary>
/// mandatory file name to read from
/// Mandatory file name to read from.
/// </summary>
[Parameter(Position = 0, ValueFromPipeline = true)]
[ValidateNotNullOrEmpty]
@ -540,7 +540,7 @@ namespace Microsoft.PowerShell.Commands
private bool _specifiedPath = false;
/// <summary>
/// The literal path of the mandatory file name to read from
/// The literal path of the mandatory file name to read from.
/// </summary>
[Parameter(ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
@ -561,7 +561,7 @@ namespace Microsoft.PowerShell.Commands
private bool _isLiteralPath = false;
/// <summary>
/// Property that sets UseCulture parameter
/// Property that sets UseCulture parameter.
/// </summary>
[Parameter(ParameterSetName = "UseCulture", Mandatory = true)]
[ValidateNotNull]
@ -579,7 +579,7 @@ namespace Microsoft.PowerShell.Commands
private bool _useculture;
///<summary>
/// Header property to customize the names
/// Header property to customize the names.
///</summary>
[Parameter(Mandatory = false)]
[ValidateNotNullOrEmpty]
@ -587,7 +587,7 @@ namespace Microsoft.PowerShell.Commands
public string[] Header { get; set; }
/// <summary>
/// Encoding optional flag
/// Encoding optional flag.
/// </summary>
[Parameter()]
[ArgumentToEncodingTransformationAttribute()]
@ -606,8 +606,7 @@ namespace Microsoft.PowerShell.Commands
public Encoding Encoding { get; set; } = ClrFacade.GetDefaultEncoding();
/// <summary>
/// Avoid writing out duplicate warning messages when there are
/// one or more unspecified names
/// Avoid writing out duplicate warning messages when there are one or more unspecified names.
/// </summary>
private bool _alreadyWarnedUnspecifiedNames = false;
@ -623,7 +622,7 @@ namespace Microsoft.PowerShell.Commands
Delimiter = ImportExportCSVHelper.SetDelimiter(this, ParameterSetName, Delimiter, _useculture);
}
/// <summary>
/// ProcessRecord overload
/// ProcessRecord overload.
/// </summary>
protected override void ProcessRecord()
{
@ -664,7 +663,7 @@ namespace Microsoft.PowerShell.Commands
#region ConvertTo-CSV Command
/// <summary>
/// Implements ConvertTo-Csv command
/// Implements ConvertTo-Csv command.
/// </summary>
[Cmdlet(VerbsData.ConvertTo, "Csv", DefaultParameterSetName = "Delimiter",
HelpUri = "https://go.microsoft.com/fwlink/?LinkID=135203", RemotingCapability = RemotingCapability.None)]
@ -674,7 +673,7 @@ namespace Microsoft.PowerShell.Commands
#region Parameter
/// <summary>
/// Overrides Base InputObject
/// Overrides Base InputObject.
/// </summary>
[Parameter(ValueFromPipeline = true, Mandatory = true, ValueFromPipelineByPropertyName = true, Position = 0)]
public override PSObject InputObject { get; set; }
@ -684,7 +683,7 @@ namespace Microsoft.PowerShell.Commands
#region Overrides
/// <summary>
/// Stores Property Names
/// Stores Property Names.
/// </summary>
private IList<string> _propertyNames;
@ -694,7 +693,7 @@ namespace Microsoft.PowerShell.Commands
private ExportCsvHelper _helper;
/// <summary>
/// BeginProcessing override
/// BeginProcessing override.
/// </summary>
protected override
void
@ -705,7 +704,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Convert the current input object to Csv and write to stream/WriteObject
/// Convert the current input object to Csv and write to stream/WriteObject.
/// </summary>
protected override
void
@ -756,7 +755,7 @@ namespace Microsoft.PowerShell.Commands
#region ConvertFrom-CSV Command
/// <summary>
/// Implements ConvertFrom-Csv command
/// Implements ConvertFrom-Csv command.
/// </summary>
[Cmdlet(VerbsData.ConvertFrom, "Csv", DefaultParameterSetName = "Delimiter",
HelpUri = "https://go.microsoft.com/fwlink/?LinkID=135201", RemotingCapability = RemotingCapability.None)]
@ -767,7 +766,7 @@ namespace Microsoft.PowerShell.Commands
#region Command Line Parameters
/// <summary>
/// Property that sets delimiter
/// Property that sets delimiter.
/// </summary>
[Parameter(Position = 1, ParameterSetName = "Delimiter")]
[ValidateNotNull]
@ -783,7 +782,7 @@ namespace Microsoft.PowerShell.Commands
public SwitchParameter UseCulture { get; set; }
/// <summary>
/// Input Object which is written in Csv format
/// Input Object which is written in Csv format.
/// </summary>
[Parameter(ValueFromPipeline = true, Mandatory = true, ValueFromPipelineByPropertyName = true, Position = 0)]
[ValidateNotNull]
@ -792,7 +791,7 @@ namespace Microsoft.PowerShell.Commands
public PSObject[] InputObject { get; set; }
///<summary>
/// Header property to customize the names
/// Header property to customize the names.
///</summary>
[Parameter(Mandatory = false)]
[ValidateNotNull]
@ -801,8 +800,7 @@ namespace Microsoft.PowerShell.Commands
public string[] Header { get; set; }
/// <summary>
/// Avoid writing out duplicate warning messages when there are
/// one or more unspecified names
/// Avoid writing out duplicate warning messages when there are one or more unspecified names.
/// </summary>
private bool _alreadyWarnedUnspecifiedNames = false;
@ -811,7 +809,7 @@ namespace Microsoft.PowerShell.Commands
#region Overrides
/// <summary>
/// BeginProcessing override
/// BeginProcessing override.
/// </summary>
protected override
void
@ -821,7 +819,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Convert the current input object to Csv and write to stream/WriteObject
/// Convert the current input object to Csv and write to stream/WriteObject.
/// </summary>
protected override
void
@ -899,8 +897,7 @@ namespace Microsoft.PowerShell.Commands
//Name of properties to be written in CSV format
/// <summary>
/// Get the name of properties from source PSObject and
/// add them to _propertyNames.
/// Get the name of properties from source PSObject and add them to _propertyNames.
/// </summary>
internal
IList<string>
@ -925,7 +922,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Converts PropertyNames in to a CSV string
/// Converts PropertyNames in to a CSV string.
/// </summary>
/// <returns></returns>
internal
@ -996,7 +993,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Get value from property object
/// Get value from property object.
/// </summary>
/// <param name="property"></param>
/// <returns></returns>
@ -1026,7 +1023,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Prepares string for writing type information
/// Prepares string for writing type information.
/// </summary>
/// <param name="source"></param>
/// <returns></returns>
@ -1092,12 +1089,12 @@ namespace Microsoft.PowerShell.Commands
#region IDisposable Members
/// <summary>
/// Set to true when object is disposed
/// Set to true when object is disposed.
/// </summary>
private bool _disposed;
/// <summary>
/// public dispose method
/// Public dispose method.
/// </summary>
public
void
@ -1118,45 +1115,44 @@ namespace Microsoft.PowerShell.Commands
#region ImportHelperConversion
/// <summary>
/// Helper class to import single CSV file
/// Helper class to import single CSV file.
/// </summary>
internal class ImportCsvHelper
{
#region constructor
/// <summary>
/// Reference to cmdlet which is using this helper class
/// Reference to cmdlet which is using this helper class.
/// </summary>
private readonly PSCmdlet _cmdlet;
/// <summary>
/// CSV delimiter (default is the "comma" / "," character)
/// CSV delimiter (default is the "comma" / "," character).
/// </summary>
private readonly char _delimiter;
/// <summary>
/// Use "UnspecifiedName" when the name is null or empty
/// Use "UnspecifiedName" when the name is null or empty.
/// </summary>
private const string UnspecifiedName = "H";
/// <summary>
/// Avoid writing out duplicate warning messages when there are
/// one or more unspecified names
/// Avoid writing out duplicate warning messages when there are one or more unspecified names.
/// </summary>
private bool _alreadyWarnedUnspecifiedName = false;
/// <summary>
/// Reference to header values
/// Reference to header values.
/// </summary>
internal IList<string> Header { get; private set; }
/// <summary>
/// ETS type name from the first line / comment in the CSV
/// ETS type name from the first line / comment in the CSV.
/// </summary>
internal string TypeName { get; private set; }
/// <summary>
/// Reader of the csv content
/// Reader of the csv content.
/// </summary>
private readonly StreamReader _sr;
@ -1184,7 +1180,7 @@ namespace Microsoft.PowerShell.Commands
#region reading helpers
/// <summary>
/// This is set to true when end of file is reached
/// This is set to true when end of file is reached.
/// </summary>
private
bool EOF
@ -1209,8 +1205,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Peeks the next character in the stream and returns true if it is
/// same as passed in character.
/// Peeks the next character in the stream and returns true if it is same as passed in character.
/// </summary>
/// <param name="c"></param>
/// <returns></returns>
@ -1307,7 +1302,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Validate the names of properties
/// Validate the names of properties.
/// </summary>
/// <param name="names"></param>
private static void ValidatePropertyNames(IList<string> names)
@ -1346,7 +1341,7 @@ namespace Microsoft.PowerShell.Commands
}
}
/// <summary>
/// Read the type information, if present
/// Read the type information, if present.
/// </summary>
/// <returns>Type string if present else null</returns>
private string
@ -1370,8 +1365,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Reads the next record from the file and returns parsed collection
/// of string.
/// Reads the next record from the file and returns parsed collection of string.
/// </summary>
/// <returns>
/// Parsed collection of strings.
@ -1379,9 +1373,9 @@ namespace Microsoft.PowerShell.Commands
private Collection<string>
ParseNextRecord()
{
//Collection of strings to return
// Collection of strings to return
Collection<string> result = new Collection<string>();
//current string
// current string
StringBuilder current = new StringBuilder();
bool seenBeginQuote = false;
@ -1561,24 +1555,23 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// This function reads the characters till next delimiter and adds them
/// to current
/// This function reads the characters till next delimiter and adds them to current.
/// </summary>
/// <param name="current"></param>
/// <param name="endOfRecord">
/// this is true if end of record is reached
/// when delimiter is hit. This would be true if delimiter is NewLine
/// This is true if end of record is reached
/// when delimiter is hit. This would be true if delimiter is NewLine.
/// </param>
/// <param name="eatTrailingBlanks">
/// If this is true, eat the trailing blanks. Note:if there are non
/// whitespace characters present, then trailing blanks are not consumed
/// whitespace characters present, then trailing blanks are not consumed.
/// </param>
private
void
ReadTillNextDelimiter(StringBuilder current, ref bool endOfRecord, bool eatTrailingBlanks)
{
StringBuilder temp = new StringBuilder();
//Did we see any non-whitespace character
// Did we see any non-whitespace character
bool nonWhiteSpace = false;
while (true)
@ -1672,7 +1665,7 @@ namespace Microsoft.PowerShell.Commands
#region ExportImport Helper
/// <summary>
/// Helper class for CSV conversion
/// Helper class for CSV conversion.
/// </summary>
internal static class ImportExportCSVHelper
{

View file

@ -9,7 +9,7 @@ namespace Microsoft.PowerShell.Commands
{
/// <summary>
///
/// Base class for a variety of commandlets that take color parameters
/// Base class for a variety of commandlets that take color parameters.
///
/// </summary>
@ -17,7 +17,7 @@ namespace Microsoft.PowerShell.Commands
class ConsoleColorCmdlet : PSCmdlet
{
/// <summary>
/// Default ctor
/// Default ctor.
/// </summary>
public ConsoleColorCmdlet()
{
@ -26,7 +26,7 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
///
/// The -ForegroundColor parameter
/// The -ForegroundColor parameter.
///
/// </summary>
/// <value></value>

View file

@ -9,7 +9,7 @@ using System.Text.RegularExpressions;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// Class comment
/// Class comment.
/// </summary>
[Cmdlet(VerbsData.ConvertFrom, "StringData", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113288", RemotingCapability = RemotingCapability.None)]
[OutputType(typeof(Hashtable))]
@ -18,8 +18,8 @@ namespace Microsoft.PowerShell.Commands
private string _stringData;
/// <summary>
/// The list of properties to display
/// These take the form of an PSPropertyExpression
/// The list of properties to display.
/// These take the form of an PSPropertyExpression.
/// </summary>
/// <value></value>
[Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true)]

View file

@ -16,7 +16,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Gets or sets the delimiter that separates the values
/// Gets or sets the delimiter that separates the values.
/// </summary>
///
internal char Delimiter { get; } = ',';
@ -26,7 +26,7 @@ namespace Microsoft.PowerShell.Commands
/// </summary>
///
/// <param name="csv">
/// String to be parsed
/// String to be parsed.
/// </param>
///
internal Collection<string> ParseCsv(string csv)

View file

@ -12,13 +12,13 @@ namespace System.Management.Automation
using Dbg = System.Management.Automation.Diagnostics;
/// <summary>
/// This class provides functionality for serializing a PSObject
/// This class provides functionality for serializing a PSObject.
/// </summary>
internal class CustomSerialization
{
#region constructor
/// <summary>
/// depth of serialization
/// Depth of serialization.
/// </summary>
private int _depth;
@ -28,17 +28,17 @@ namespace System.Management.Automation
private XmlWriter _writer;
/// <summary>
/// Whether type information should be included in the xml
/// Whether type information should be included in the xml.
/// </summary>
private bool _notypeinformation;
/// <summary>
/// CustomerSerializer used for formatting the output for _writer
/// CustomerSerializer used for formatting the output for _writer.
/// </summary>
private CustomInternalSerializer _serializer;
/// <summary>
/// Constructor
/// Constructor.
/// </summary>
/// <param name="writer">
/// writer to be used for serialization.
@ -67,12 +67,12 @@ namespace System.Management.Automation
}
/// <summary>
/// Default depth of serialization
/// Default depth of serialization.
/// </summary>
public static int MshDefaultSerializationDepth { get; } = 1;
/// <summary>
/// Constructor
/// Constructor.
/// </summary>
/// <param name="writer">
/// writer to be used for serialization.
@ -92,10 +92,10 @@ namespace System.Management.Automation
private bool _firstCall = true;
/// <summary>
/// Serializes passed in object
/// Serializes passed in object.
/// </summary>
/// <param name="source">
/// object to be serialized
/// Object to be serialized.
/// </param>
internal void Serialize(object source)
{
@ -117,10 +117,10 @@ namespace System.Management.Automation
}
/// <summary>
/// Serializes passed in object
/// Serializes passed in object.
/// </summary>
/// <param name="source">
/// object to be serialized
/// Object to be serialized.
/// </param>
internal void SerializeAsStream(object source)
{
@ -135,7 +135,7 @@ namespace System.Management.Automation
}
/// <summary>
/// Writes the start of root element
/// Writes the start of root element.
/// </summary>
private void Start()
{
@ -143,7 +143,7 @@ namespace System.Management.Automation
}
/// <summary>
/// Write the end of root element
/// Write the end of root element.
/// </summary>
internal void Done()
{
@ -157,7 +157,7 @@ namespace System.Management.Automation
}
/// <summary>
/// Flush the writer
/// Flush the writer.
/// </summary>
internal void DoneAsStream()
{
@ -185,36 +185,36 @@ namespace System.Management.Automation
#region constructor
/// <summary>
/// Xml writer to be used
/// Xml writer to be used.
/// </summary>
private XmlWriter _writer;
/// <summary>
/// check first call for every pipeline object to write Object tag else property tag
/// Check first call for every pipeline object to write Object tag else property tag.
/// </summary>
private bool _firstcall;
/// <summary>
/// should the type information to be shown
/// Should the type information to be shown.
/// </summary>
private bool _notypeinformation;
/// <summary>
/// check object call
/// Check object call.
/// </summary>
private bool _firstobjectcall = true;
/// <summary>
/// Constructor
/// Constructor.
/// </summary>
/// <param name="writer">
/// Xml writer to be used
/// Xml writer to be used.
/// </param>
/// <param name="notypeinformation">
/// Xml writer to be used
/// Xml writer to be used.
/// </param>
/// <param name="isfirstcallforObject">
/// check first call for every pipeline object to write Object tag else property tag
/// Check first call for every pipeline object to write Object tag else property tag.
/// </param>
internal CustomInternalSerializer(XmlWriter writer, bool notypeinformation, bool isfirstcallforObject)
{
@ -232,7 +232,7 @@ namespace System.Management.Automation
private bool _isStopping = false;
/// <summary>
/// Called from a separate thread will stop the serialization process
/// Called from a separate thread will stop the serialization process.
/// </summary>
internal void Stop()
{
@ -324,7 +324,7 @@ namespace System.Management.Automation
}
/// <summary>
/// Serializes PSObject whose base objects are of primitive known type
/// Serializes PSObject whose base objects are of primitive known type.
/// </summary>
/// <param name="source"></param>
/// <param name="property"></param>
@ -427,8 +427,7 @@ namespace System.Management.Automation
}
/// <summary>
/// Checks if source is known container type and returns appropriate
/// information
/// Checks if source is known container type and returns appropriate information.
/// </summary>
/// <param name="source"></param>
/// <param name="ct"></param>
@ -506,7 +505,7 @@ namespace System.Management.Automation
}
/// <summary>
/// Checks if derived is of type baseType or a type derived from baseType
/// Checks if derived is of type baseType or a type derived from baseType.
/// </summary>
/// <param name="derived"></param>
/// <param name="baseType"></param>
@ -532,11 +531,11 @@ namespace System.Management.Automation
#region Write PSObject
/// <summary>
/// Serializes an PSObject whose baseobject is of primitive type
/// Serializes an PSObject whose baseobject is of primitive type.
/// and which has notes.
/// </summary>
/// <param name="source">
/// source from which notes are written
/// Source from which notes are written.
/// </param>
/// <param name="primitive">
/// primitive object which is written as base object. In most cases it
@ -676,11 +675,11 @@ namespace System.Management.Automation
}
/// <summary>
/// Serialize member set. This method serializes without writing
/// Serialize member set. This method serializes without writing.
/// enclosing tags and attributes.
/// </summary>
/// <param name="me">
/// enumerable containing members
/// Enumerable containing members
/// </param>
/// <param name="depth"></param>
/// <param name="writeEnclosingMemberSetElementTag">
@ -724,7 +723,7 @@ namespace System.Management.Automation
#region properties
/// <summary>
/// Serializes properties of PSObject
/// Serializes properties of PSObject.
/// </summary>
private void WritePSObjectProperties(PSObject source, int depth)
{
@ -778,17 +777,16 @@ namespace System.Management.Automation
}
/// <summary>
/// Serializes properties from collection
/// Serializes properties from collection.
/// </summary>
/// <param name="propertyCollection">
/// Collection of properties to serialize
/// Collection of properties to serialize.
/// </param>
/// <param name="name">
/// Name for enclosing element tag
/// Name for enclosing element tag.
/// </param>
/// <param name="depth">
/// depth to which each property should be
/// serialized
/// Depth to which each property should be serialized.
/// </param>
private void SerializeProperties(
PSMemberInfoInternalCollection<PSPropertyInfo> propertyCollection, string name, int depth)
@ -826,10 +824,10 @@ namespace System.Management.Automation
#region enumerable and dictionary
/// <summary>
/// Serializes IEnumerable
/// Serializes IEnumerable.
/// </summary>
/// <param name="enumerable">
/// enumerable which is serialized
/// Enumerable which is serialized.
/// </param>
/// <param name="depth"></param>
private void WriteEnumerable(IEnumerable enumerable, int depth)
@ -875,7 +873,7 @@ namespace System.Management.Automation
}
/// <summary>
/// Serializes IDictionary
/// Serializes IDictionary.
/// </summary>
/// <param name="dictionary">dictionary which is serialized</param>
/// <param name="depth"></param>
@ -945,7 +943,7 @@ namespace System.Management.Automation
/// </summary>
///
/// <param name="source">
/// PSObject to be converted to string
/// PSObject to be converted to string.
/// </param>
///
/// <returns>
@ -990,11 +988,10 @@ namespace System.Management.Automation
/// <summary>
/// Reads the information the PSObject
/// and returns true if this object should be serialized as
/// string
/// and returns true if this object should be serialized as string.
/// </summary>
/// <param name="source">PSObject to be serialized</param>
/// <returns>true if the object needs to be serialized as a string</returns>
/// <param name="source">PSObject to be serialized.</param>
/// <returns>true if the object needs to be serialized as a string.</returns>
private static bool SerializeAsString(PSObject source)
{
return source.GetSerializationMethod(null) == SerializationMethod.String;
@ -1003,7 +1000,7 @@ namespace System.Management.Automation
#endregion serialize as string
/// <summary>
/// compute the serialization depth for an PSObject instance subtree
/// Compute the serialization depth for an PSObject instance subtree.
/// </summary>
/// <param name="source">PSObject whose serialization depth has to be computed</param>
/// <param name="depth">current depth</param>
@ -1027,7 +1024,7 @@ namespace System.Management.Automation
}
/// <summary>
/// Writes null
/// Writes null.
/// </summary>
/// <param name="property"></param>
private void WriteNull(string property)
@ -1094,7 +1091,7 @@ namespace System.Management.Automation
}
/// <summary>
/// Writes an item or property in Monad namespace
/// Writes an item or property in Monad namespace.
/// </summary>
/// <param name="writer">The XmlWriter stream to which the object is serialized.</param>
/// <param name="property">name of property. Pass null for item</param>
@ -1112,7 +1109,7 @@ namespace System.Management.Automation
#region misc
/// <summary>
/// Writes start element in Monad namespace
/// Writes start element in Monad namespace.
/// </summary>
/// <param name="writer"></param>
/// <param name="elementTag">tag of element</param>
@ -1122,7 +1119,7 @@ namespace System.Management.Automation
}
/// <summary>
/// Writes attribute in monad namespace
/// Writes attribute in monad namespace.
/// </summary>
/// <param name="writer"></param>
/// <param name="name">name of attribute</param>

View file

@ -4,36 +4,36 @@
namespace System.Management.Automation
{
/// <summary>
/// This class contains strings required for serialization for Convertto-XML
/// This class contains strings required for serialization for ConvertTo-XML.
/// </summary>
internal static class CustomSerializationStrings
{
#region element tags
/// <summary>
/// Element tag for root node
/// Element tag for root node.
/// </summary>
internal const string RootElementTag = "Objects";
/// <summary>
/// Element tag for PSObject
/// Element tag for PSObject.
/// </summary>
internal const string PSObjectTag = "Object";
/// <summary>
/// Element tag for properties
/// Element tag for properties.
/// </summary>
internal const string Properties = "Property";
#region attribute tags
/// <summary>
/// String for name attribute
/// String for name attribute.
/// </summary>
internal const string NameAttribute = "Name";
/// <summary>
/// String for type attribute
/// String for type attribute.
/// </summary>
internal const string TypeAttribute = "Type";
@ -42,12 +42,12 @@ namespace System.Management.Automation
#region known container tags
/// <summary>
/// Value of name attribute for dictionary key part in dictionary entry
/// Value of name attribute for dictionary key part in dictionary entry.
/// </summary>
internal const string DictionaryKey = "Key";
/// <summary>
/// Value of name attribute for dictionary value part in dictionary entry
/// Value of name attribute for dictionary value part in dictionary entry.
/// </summary>
internal const string DictionaryValue = "Value";

View file

@ -15,8 +15,8 @@ namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// This cmdlet takes a Runspace object and checks to see if it is debuggable (i.e, if
/// it is running a script or is currently stopped in the debugger. If it
/// is debuggable then it breaks into the Runspace debugger in step mode.
/// it is running a script or is currently stopped in the debugger.
/// If it is debuggable then it breaks into the Runspace debugger in step mode.
/// </summary>
[SuppressMessage("Microsoft.PowerShell", "PS1012:CallShouldProcessOnlyIfDeclaringSupport")]
[Cmdlet(VerbsDiagnostic.Debug, "Runspace", SupportsShouldProcess = true, DefaultParameterSetName = DebugRunspaceCommand.RunspaceParameterSet,

View file

@ -6,7 +6,7 @@ using System.Management.Automation;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// This class implements Disable-PSBreakpoint
/// This class implements Disable-PSBreakpoint.
/// </summary>
[Cmdlet(VerbsLifecycle.Disable, "PSBreakpoint", SupportsShouldProcess = true, DefaultParameterSetName = "Breakpoint", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113294")]
[OutputType(typeof(Breakpoint))]
@ -44,4 +44,4 @@ namespace Microsoft.PowerShell.Commands
}
}
}
}
}

View file

@ -9,12 +9,12 @@ using System.Management.Automation.Internal;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// Base class for Enable/Disable/Remove-PSBreakpoint
/// Base class for Enable/Disable/Remove-PSBreakpoint.
/// </summary>
public abstract class PSBreakpointCommandBase : PSCmdlet
{
/// <summary>
/// the breakpoint to enable
/// The breakpoint to enable.
/// </summary>
[Parameter(ParameterSetName = "Breakpoint", ValueFromPipeline = true, Position = 0, Mandatory = true)]
[ValidateNotNull]
@ -32,7 +32,7 @@ namespace Microsoft.PowerShell.Commands
private Breakpoint[] _breakpoints;
/// <summary>
/// The Id of the breakpoint to enable
/// The Id of the breakpoint to enable.
/// </summary>
[Parameter(ParameterSetName = "Id", ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true)]
[ValidateNotNull]
@ -51,7 +51,7 @@ namespace Microsoft.PowerShell.Commands
private int[] _ids;
/// <summary>
/// Gathers the list of breakpoints to process and calls ProcessBreakpoints
/// Gathers the list of breakpoints to process and calls ProcessBreakpoints.
/// </summary>
protected override void ProcessRecord()
{
@ -93,7 +93,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Process the given breakpoint
/// Process the given breakpoint.
/// </summary>
protected abstract void ProcessBreakpoint(Breakpoint breakpoint);
@ -113,7 +113,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// This class implements Enable-PSBreakpoint
/// This class implements Enable-PSBreakpoint.
/// </summary>
[Cmdlet(VerbsLifecycle.Enable, "PSBreakpoint", SupportsShouldProcess = true, DefaultParameterSetName = "Id", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113295")]
[OutputType(typeof(Breakpoint))]
@ -139,7 +139,7 @@ namespace Microsoft.PowerShell.Commands
private bool _passThru;
/// <summary>
/// Enables the given breakpoint
/// Enables the given breakpoint.
/// </summary>
protected override void ProcessBreakpoint(Breakpoint breakpoint)
{
@ -151,4 +151,4 @@ namespace Microsoft.PowerShell.Commands
}
}
}
}
}

View file

@ -14,7 +14,7 @@ namespace Microsoft.PowerShell.Commands
#region PSRunspaceDebug class
/// <summary>
/// Runspace Debug Options class
/// Runspace Debug Options class.
/// </summary>
public sealed class PSRunspaceDebug
{
@ -98,27 +98,27 @@ namespace Microsoft.PowerShell.Commands
#region Strings
/// <summary>
/// RunspaceParameterSet
/// RunspaceParameterSet.
/// </summary>
protected const string RunspaceParameterSet = "RunspaceParameterSet";
/// <summary>
/// RunspaceNameParameterSet
/// RunspaceNameParameterSet.
/// </summary>
protected const string RunspaceNameParameterSet = "RunspaceNameParameterSet";
/// <summary>
/// RunspaceIdParameterSet
/// RunspaceIdParameterSet.
/// </summary>
protected const string RunspaceIdParameterSet = "RunspaceIdParameterSet";
/// <summary>
/// RunspaceInstanceIdParameterSet
/// RunspaceInstanceIdParameterSet.
/// </summary>
protected const string RunspaceInstanceIdParameterSet = "RunspaceInstanceIdParameterSet";
/// <summary>
/// ProcessNameParameterSet
/// ProcessNameParameterSet.
/// </summary>
protected const string ProcessNameParameterSet = "ProcessNameParameterSet";
@ -127,7 +127,7 @@ namespace Microsoft.PowerShell.Commands
#region Parameters
/// <summary>
/// Runspace Name
/// Runspace Name.
/// </summary>
[Parameter(Position = 0,
ParameterSetName = CommonRunspaceCommandBase.RunspaceNameParameterSet)]
@ -140,7 +140,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Runspace
/// Runspace.
/// </summary>
[Parameter(Position = 0,
Mandatory = true,
@ -156,7 +156,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Runspace Id
/// Runspace Id.
/// </summary>
[Parameter(Position = 0,
Mandatory = true,
@ -169,7 +169,7 @@ namespace Microsoft.PowerShell.Commands
set;
}
/// <summary>
/// RunspaceInstanceId
/// RunspaceInstanceId.
/// </summary>
[Parameter(Position = 0,
Mandatory = true,
@ -248,7 +248,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Returns Runspace Debugger
/// Returns Runspace Debugger.
/// </summary>
/// <param name="runspace">Runspace</param>
/// <returns>Debugger</returns>
@ -354,7 +354,7 @@ namespace Microsoft.PowerShell.Commands
#region Overrides
/// <summary>
/// Process Record
/// Process Record.
/// </summary>
protected override void ProcessRecord()
{
@ -434,7 +434,7 @@ namespace Microsoft.PowerShell.Commands
#region Overrides
/// <summary>
/// Process Record
/// Process Record.
/// </summary>
protected override void ProcessRecord()
{
@ -491,7 +491,7 @@ namespace Microsoft.PowerShell.Commands
#region Overrides
/// <summary>
/// Process Record
/// Process Record.
/// </summary>
protected override void ProcessRecord()
{
@ -529,7 +529,7 @@ namespace Microsoft.PowerShell.Commands
#region Overrides
/// <summary>
/// EndProcessing
/// EndProcessing.
/// </summary>
protected override void EndProcessing()
{

View file

@ -11,23 +11,23 @@ using System.Management.Automation.Internal;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// The formats that export-alias supports
/// The formats that export-alias supports.
/// </summary>
public enum ExportAliasFormat
{
/// <summary>
/// Aliases will be exported to a CSV file
/// Aliases will be exported to a CSV file.
/// </summary>
Csv,
/// <summary>
/// Aliases will be exported as an MSH script
/// Aliases will be exported as an MSH script.
/// </summary>
Script
}
/// <summary>
/// The implementation of the "export-alias" cmdlet
/// The implementation of the "export-alias" cmdlet.
/// </summary>
///
[Cmdlet(VerbsData.Export, "Alias", SupportsShouldProcess = true, DefaultParameterSetName = "ByPath", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113296")]
@ -73,7 +73,7 @@ namespace Microsoft.PowerShell.Commands
private bool _isLiteralPath = false;
/// <summary>
/// The Name parameter for the command
/// The Name parameter for the command.
/// </summary>
///
[Parameter(Position = 1, ValueFromPipelineByPropertyName = true)]
@ -85,8 +85,7 @@ namespace Microsoft.PowerShell.Commands
private string[] _names = new string[] { "*" };
/// <summary>
/// If set to true, the alias that is set is passed to the
/// pipeline.
/// If set to true, the alias that is set is passed to the pipeline.
/// </summary>
///
[Parameter]
@ -164,7 +163,7 @@ namespace Microsoft.PowerShell.Commands
private bool _noclobber;
/// <summary>
/// The description that gets added to the file as a comment
/// The description that gets added to the file as a comment.
/// </summary>
/// <value></value>
[Parameter]
@ -254,7 +253,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Writes the aliases to the file
/// Writes the aliases to the file.
/// </summary>
protected override void EndProcessing()
{
@ -304,7 +303,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Holds all the matching aliases for writing to the file
/// Holds all the matching aliases for writing to the file.
/// </summary>
private Collection<AliasInfo> _matchingAliases = new Collection<AliasInfo>();
@ -367,7 +366,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Open the file to which aliases should be exported
/// Open the file to which aliases should be exported.
/// </summary>
/// <param name="readOnlyFileInfo">
/// If not null, this is the file whose read-only attribute

View file

@ -41,7 +41,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Auxiliar used in GetValue methods since the list does not deal well with unlimited sized lines
/// Auxiliar used in GetValue methods since the list does not deal well with unlimited sized lines.
/// </summary>
/// <param name="src">source string</param>
/// <returns>the source string limited in the number of lines</returns>
@ -56,4 +56,4 @@ namespace Microsoft.PowerShell.Commands
return HostUtilities.GetMaxLines(srcString, 10);
}
}
}
}

View file

@ -20,7 +20,7 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// None is the default and it means OK and Cancel will not be present
/// and no objects will be written to the pipeline.
/// The selectionMode of the actual list will still be multiple
/// The selectionMode of the actual list will still be multiple.
/// </summary>
None,
/// <summary>
@ -34,7 +34,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Implementation for the Out-GridView command
/// Implementation for the Out-GridView command.
/// </summary>
[Cmdlet(VerbsData.Out, "GridView", DefaultParameterSetName = "PassThru", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113364")]
public class OutGridViewCommand : PSCmdlet, IDisposable
@ -53,7 +53,7 @@ namespace Microsoft.PowerShell.Commands
#region Constructors
/// <summary>
/// Constructor for OutGridView
/// Constructor for OutGridView.
/// </summary>
public OutGridViewCommand()
{
@ -64,7 +64,7 @@ namespace Microsoft.PowerShell.Commands
#region Input Parameters
/// <summary>
/// This parameter specifies the current pipeline object
/// This parameter specifies the current pipeline object.
/// </summary>
[Parameter(ValueFromPipeline = true)]
public PSObject InputObject { get; set; } = AutomationNull.Value;
@ -77,21 +77,21 @@ namespace Microsoft.PowerShell.Commands
public string Title { get; set; }
/// <summary>
/// Get or sets a value indicating whether the cmdlet should wait for the window to be closed
/// Get or sets a value indicating whether the cmdlet should wait for the window to be closed.
/// </summary>
[Parameter(ParameterSetName = "Wait")]
public SwitchParameter Wait { get; set; }
/// <summary>
/// Get or sets a value indicating whether the selected items should be written to the pipeline
/// and if it should be possible to select multiple or single list items
/// and if it should be possible to select multiple or single list items.
/// </summary>
[Parameter(ParameterSetName = "OutputMode")]
public OutputModeOption OutputMode { set; get; }
/// <summary>
/// Gets or sets a value indicating whether the selected items should be written to the pipeline
/// Setting this to true is the same as setting the OutputMode to Multiple
/// Gets or sets a value indicating whether the selected items should be written to the pipeline.
/// Setting this to true is the same as setting the OutputMode to Multiple.
/// </summary>
[Parameter(ParameterSetName = "PassThru")]
public SwitchParameter PassThru
@ -128,7 +128,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Blocks depending on the wait and selected
/// Blocks depending on the wait and selected.
/// </summary>
protected override void EndProcessing()
{
@ -234,7 +234,7 @@ namespace Microsoft.PowerShell.Commands
#region Private Methods
/// <summary>
/// Execute formatting on a single object
/// Execute formatting on a single object.
/// </summary>
/// <param name="input">object to process</param>
private void ProcessObject(PSObject input)
@ -463,7 +463,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Implements IDisposable logic
/// Implements IDisposable logic.
/// </summary>
/// <param name="isDisposing">true if being called from Dispose</param>
private void Dispose(bool isDisposing)
@ -479,7 +479,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Dispose method in IDisposable
/// Dispose method in IDisposable.
/// </summary>
public void Dispose()
{
@ -488,7 +488,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Finalizer
/// Finalizer.
/// </summary>
~OutGridViewCommand()
{

View file

@ -235,7 +235,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Implements IDisposable logic
/// Implements IDisposable logic.
/// </summary>
/// <param name="isDisposing">true if being called from Dispose</param>
private void Dispose(bool isDisposing)
@ -251,7 +251,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Dispose method in IDisposable
/// Dispose method in IDisposable.
/// </summary>
public void Dispose()
{
@ -293,7 +293,7 @@ namespace Microsoft.PowerShell.Commands
/// Return the selected item of the OutGridView.
/// </summary>
/// <returns>
/// The selected item
/// The selected item.
/// </returns>
internal List<PSObject> GetSelectedItems()
{

View file

@ -12,8 +12,7 @@ using Microsoft.PowerShell.Commands.Internal.Format;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// Gets formatting information from the loading
/// format information database
/// Gets formatting information from the loading format information database.
/// </summary>
/// <remarks>Currently supports only table controls
/// </remarks>
@ -25,8 +24,7 @@ namespace Microsoft.PowerShell.Commands
private WildcardPattern[] _filter = new WildcardPattern[1];
/// <summary>
/// Get Formatting information only for the specified
/// typename
/// Get Formatting information only for the specified typename.
/// </summary>
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
[ValidateNotNullOrEmpty]
@ -65,7 +63,7 @@ namespace Microsoft.PowerShell.Commands
public Version PowerShellVersion { get; set; }
/// <summary>
/// set the default filter
/// Set the default filter.
/// </summary>
protected override void BeginProcessing()
{
@ -93,8 +91,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Takes out the content from the database and writes them
/// out
/// Takes out the content from the database and writes them out.
/// </summary>
protected override void ProcessRecord()
{

View file

@ -9,8 +9,7 @@ using System.Diagnostics.CodeAnalysis;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// Cmdlet used to write a collection of formatting directives to
/// an XML file
/// Cmdlet used to write a collection of formatting directives to an XML file.
/// </summary>
[Cmdlet(VerbsData.Export, "FormatData", DefaultParameterSetName = "ByPath", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=144302")]
public class ExportFormatDataCommand : PSCmdlet
@ -18,7 +17,7 @@ namespace Microsoft.PowerShell.Commands
private ExtendedTypeDefinition[] _typeDefinition;
/// <summary>
/// type definition to include in export
/// Type definition to include in export.
/// </summary>
[Parameter(Mandatory = true, ValueFromPipeline = true)]
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
@ -37,7 +36,7 @@ namespace Microsoft.PowerShell.Commands
private string _filepath;
/// <summary>
/// Path of the XML file
/// Path of the XML file.
/// </summary>
[Parameter(ParameterSetName = "ByPath", Mandatory = true)]
[Alias("FilePath")]
@ -54,7 +53,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Literal path of the XML file
/// Literal path of the XML file.
/// </summary>
[Parameter(ParameterSetName = "ByLiteralPath", Mandatory = true)]
[Alias("PSPath","LP")]
@ -77,7 +76,7 @@ namespace Microsoft.PowerShell.Commands
private bool _force;
/// <summary>
/// Force writing a file
/// Force writing a file.
/// </summary>
[Parameter()]
public SwitchParameter Force
@ -93,7 +92,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Do not overwrite file if exists
/// Do not overwrite file if exists.
/// </summary>
[Parameter()]
[Alias("NoOverwrite")]
@ -111,7 +110,7 @@ namespace Microsoft.PowerShell.Commands
private bool _noclobber;
/// <summary>
/// Include scriptblocks for export
/// Include scriptblocks for export.
/// </summary>
[Parameter()]
public SwitchParameter IncludeScriptBlock
@ -128,7 +127,7 @@ namespace Microsoft.PowerShell.Commands
private bool _includescriptblock;
/// <summary>
/// Adds the type to the collection
/// Adds the type to the collection.
/// </summary>
protected override void ProcessRecord()
{

View file

@ -25,14 +25,14 @@ namespace Microsoft.PowerShell.Commands
#region Parameters
/// <summary>
/// Path of file(s) to process
/// Path of file(s) to process.
/// </summary>
[Parameter(Mandatory = true, Position = 0, ParameterSetName = "Path")]
[ValidateNotNullOrEmpty()]
public string[] Path { get; set; }
/// <summary>
/// Literal path of file to process
/// Literal path of file to process.
/// </summary>
[Parameter(Mandatory = true, ParameterSetName = "LiteralPath")]
[ValidateNotNullOrEmpty()]
@ -40,13 +40,13 @@ namespace Microsoft.PowerShell.Commands
public string[] LiteralPath { get; set; }
/// <summary>
/// Ojbect to process
/// Ojbect to process.
/// </summary>
[Parameter(Mandatory = true, ParameterSetName = "ByInputObject", ValueFromPipeline = true)]
public PSObject InputObject { get; set; }
/// <summary>
/// Type of character encoding for InputObject
/// Type of character encoding for InputObject.
/// </summary>
[Parameter(ParameterSetName = "ByInputObject")]
[ArgumentToEncodingTransformationAttribute()]
@ -65,7 +65,7 @@ namespace Microsoft.PowerShell.Commands
public Encoding Encoding { get; set; } = ClrFacade.GetDefaultEncoding();
/// <summary>
/// This parameter is no-op
/// This parameter is no-op.
/// </summary>
[Parameter(ParameterSetName = "ByInputObject")]
public SwitchParameter Raw { get; set; }

View file

@ -7,13 +7,13 @@ using Microsoft.PowerShell.Commands.Internal.Format;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// implementation for the format-table command
/// Implementation for the format-table command.
/// </summary>
[Cmdlet(VerbsCommon.Format, "List", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113302")]
public class FormatListCommand : OuterFormatTableAndListBase
{
/// <summary>
/// constructor to set the inner command
/// Constructor to set the inner command.
/// </summary>
public FormatListCommand()
{

View file

@ -7,14 +7,13 @@ using Microsoft.PowerShell.Commands.Internal.Format;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// implementation for the format-custom command. It just calls the formatting
/// engine on complex shape
/// Implementation for the format-custom command. It just calls the formatting engine on complex shape.
/// </summary>
[Cmdlet(VerbsCommon.Format, "Custom", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113301")]
public class FormatCustomCommand : OuterFormatShapeCommandBase
{
/// <summary>
/// constructor to se the inner command
/// Constructor to se the inner command.
/// </summary>
public FormatCustomCommand()
{
@ -24,7 +23,7 @@ namespace Microsoft.PowerShell.Commands
#region Command Line Switches
/// <summary>
/// Positional parameter for properties, property sets and table sets
/// Positional parameter for properties, property sets and table sets.
/// specified on the command line.
/// The parameter is optional, since the defaults
/// will be determined using property sets, etc.

View file

@ -8,13 +8,13 @@ using Microsoft.PowerShell.Commands.Internal.Format;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// implementation for the format-table command
/// Implementation for the format-table command.
/// </summary>
[Cmdlet(VerbsCommon.Format, "Table", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113303")]
public class FormatTableCommand : OuterFormatTableBase
{
/// <summary>
/// constructor to set the inner command
/// Constructor to set the inner command.
/// </summary>
public FormatTableCommand()
{

View file

@ -11,13 +11,13 @@ using Microsoft.PowerShell.Commands.Internal.Format;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// implementation for the format-table command
/// Implementation for the format-table command.
/// </summary>
[Cmdlet(VerbsCommon.Format, "Wide", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113304")]
public class FormatWideCommand : OuterFormatShapeCommandBase
{
/// <summary>
/// constructor to se the inner command
/// Constructor to se the inner command.
/// </summary>
public FormatWideCommand()
{
@ -27,10 +27,8 @@ namespace Microsoft.PowerShell.Commands
#region Command Line Switches
/// <summary>
/// Positional parameter for properties, property sets and table sets
/// specified on the command line.
/// The parameter is optional, since the defaults
/// will be determined using property sets, etc.
/// Positional parameter for properties, property sets and table sets specified on the command line.
/// The parameter is optional, since the defaults will be determined using property sets, etc.
/// </summary>
[Parameter(Position = 0)]
public object Property
@ -42,7 +40,7 @@ namespace Microsoft.PowerShell.Commands
private object _prop;
/// <summary>
/// optional, non positional parameter
/// Optional, non positional parameter.
/// </summary>
/// <value></value>
[Parameter]
@ -59,7 +57,7 @@ namespace Microsoft.PowerShell.Commands
private Nullable<bool> _autosize = null;
/// <summary>
/// optional, non positional parameter
/// Optional, non positional parameter.
/// </summary>
/// <value></value>
[Parameter]

View file

@ -20,13 +20,13 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// implementation for the out-file command
/// Implementation for the out-file command.
/// </summary>
[Cmdlet(VerbsData.Out, "File", SupportsShouldProcess = true, DefaultParameterSetName = "ByPath", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113363")]
public class OutFileCommand : FrontEndCommandBase
{
/// <summary>
/// set inner command
/// Set inner command.
/// </summary>
public OutFileCommand()
{
@ -36,7 +36,7 @@ namespace Microsoft.PowerShell.Commands
#region Command Line Parameters
/// <summary>
/// mandatory file name to write to
/// Mandatory file name to write to.
/// </summary>
[Alias("Path")]
[Parameter(Mandatory = true, Position = 0, ParameterSetName = "ByPath")]
@ -49,7 +49,7 @@ namespace Microsoft.PowerShell.Commands
private string _fileName;
/// <summary>
/// mandatory file name to write to
/// Mandatory file name to write to.
/// </summary>
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "ByLiteralPath")]
[Alias("PSPath","LP")]
@ -68,7 +68,7 @@ namespace Microsoft.PowerShell.Commands
private bool _isLiteralPath = false;
/// <summary>
/// Encoding optional flag
/// Encoding optional flag.
/// </summary>
///
[Parameter(Position = 1)]
@ -122,7 +122,7 @@ namespace Microsoft.PowerShell.Commands
private bool _noclobber;
/// <summary>
/// optional, number of columns to use when writing to device
/// Optional, number of columns to use when writing to device.
/// </summary>
[ValidateRangeAttribute(2, int.MaxValue)]
[Parameter]
@ -155,7 +155,7 @@ namespace Microsoft.PowerShell.Commands
#endregion
/// <summary>
/// read command line parameters
/// Read command line parameters.
/// </summary>
protected override void BeginProcessing()
{
@ -176,11 +176,11 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// one time initialization: acquire a screen host interface
/// by creating one on top of a file
/// One-time initialization: acquire a screen host interface
/// by creating one on top of a file.
/// NOTICE: we assume that at this time the file name is
/// available in the CRO. JonN recommends: file name has to be
/// a MANDATORY parameter on the command line
/// a MANDATORY parameter on the command line.
/// </summary>
private LineOutput InstantiateLineOutputInterface()
{
@ -221,7 +221,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// execution entry point
/// Execution entry point.
/// </summary>
protected override void ProcessRecord()
{
@ -238,7 +238,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// execution entry point
/// Execution entry point.
/// </summary>
protected override void EndProcessing()
{
@ -268,7 +268,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
///
/// InternalDispose.
/// </summary>
protected override void InternalDispose()
{
@ -293,12 +293,12 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// handle to file stream
/// Handle to file stream.
/// </summary>
private FileStream _fs;
/// <summary>
/// stream writer used to write to file
/// Stream writer used to write to file.
/// </summary>
private StreamWriter _sw = null;
@ -314,9 +314,8 @@ namespace Microsoft.PowerShell.Commands
private bool _processRecordExecuted = false;
/// <summary>
/// FileInfo of file to clear read-only flag when operation is complete
/// FileInfo of file to clear read-only flag when operation is complete.
/// </summary>
private FileInfo _readOnlyFileInfo = null;
}
}

View file

@ -9,19 +9,19 @@ using System.Drawing.Printing;
namespace Microsoft.PowerShell.Commands.Internal.Format
{
/// <summary>
/// Implementation of the LineOutput interface for printer
/// Implementation of the LineOutput interface for printer.
/// </summary>
internal sealed class PrinterLineOutput : LineOutput
{
#region LineOutput implementation
/// <summary>
/// full buffering for printer
/// Full buffering for printer.
/// </summary>
internal override bool RequiresBuffering { get { return true; } }
/// <summary>
/// do the printing on playback
/// Do the printing on playback.
/// </summary>
internal override void ExecuteBufferPlayBack(DoPlayBackCall playback)
{
@ -30,7 +30,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format
}
/// <summary>
/// the # of columns for the printer
/// The # of columns for the printer.
/// </summary>
/// <value></value>
internal override int ColumnNumber
@ -43,7 +43,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format
}
/// <summary>
/// the # of rows for the printer
/// The # of rows for the printer.
/// </summary>
/// <value></value>
internal override int RowNumber
@ -56,7 +56,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format
}
/// <summary>
/// write a line to the output device
/// Write a line to the output device.
/// </summary>
/// <param name="s">line to write</param>
internal override void WriteLine(string s)
@ -70,7 +70,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format
#endregion
/// <summary>
/// Used for static initializations like DefaultPrintFontName
/// Used for static initializations like DefaultPrintFontName.
/// </summary>
static PrinterLineOutput()
{
@ -81,7 +81,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format
}
/// <summary>
/// constructor for the class
/// Constructor for the class.
/// </summary>
/// <param name="printerName">name of printer, if null use default printer</param>
internal PrinterLineOutput(string printerName)
@ -96,7 +96,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format
}
/// <summary>
/// callback to be called when IConsole.WriteLine() is called by WriteLineHelper
/// Callback to be called when IConsole.WriteLine() is called by WriteLineHelper.
/// </summary>
/// <param name="s">string to write</param>
private void OnWriteLine(string s)
@ -105,9 +105,9 @@ namespace Microsoft.PowerShell.Commands.Internal.Format
}
/// <summary>
/// callback to be called when Console.Write() is called by WriteLineHelper
/// Callback to be called when Console.Write() is called by WriteLineHelper.
/// This is called when the WriteLineHelper needs to write a line whose length
/// is the same as the width of the screen buffer
/// is the same as the width of the screen buffer.
/// </summary>
/// <param name="s">string to write</param>
private void OnWrite(string s)
@ -116,7 +116,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format
}
/// <summary>
/// do the printing
/// Do the printing.
/// </summary>
private void DoPrint()
{
@ -148,9 +148,9 @@ namespace Microsoft.PowerShell.Commands.Internal.Format
}
/// <summary>
/// helper to create a font.
/// Helper to create a font.
/// If the font object exists, it does nothing.
/// Else, the a new object is created and verified
/// Else, the a new object is created and verified.
/// </summary>
/// <param name="g">GDI+ graphics object needed for verification</param>
private void CreateFont(Graphics g)
@ -177,7 +177,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format
/// <summary>
/// internal helper to verify that the font is fixed pitch. If the test fails,
/// it reverts to the default font
/// it reverts to the default font.
/// </summary>
/// <param name="g">GDI+ graphics object needed for verification</param>
private void VerifyFont(Graphics g)
@ -204,7 +204,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format
}
/// <summary>
/// Event fired for each page to print
/// Event fired for each page to print.
/// </summary>
/// <param name="sender">sender, not used</param>
/// <param name="ev">print page event</param>
@ -264,32 +264,32 @@ namespace Microsoft.PowerShell.Commands.Internal.Format
}
/// <summary>
/// flag for one time initialization of the interface (columns, etc.)
/// Flag for one-time initialization of the interface (columns, etc.).
/// </summary>
private bool _printingInitialized = false;
/// <summary>
/// callback to ask the outputter to playback its cache
/// Callback to ask the outputter to playback its cache.
/// </summary>
private DoPlayBackCall _playbackCall;
/// <summary>
/// name of the printer to print to. Null means default printer
/// Name of the printer to print to. Null means default printer.
/// </summary>
private string _printerName = null;
/// <summary>
/// name of the font to use, if null the default is used
/// Name of the font to use, if null the default is used.
/// </summary>
private string _printFontName = null;
/// <summary>
/// font size
/// Font size.
/// </summary>
private int _printFontSize = 0;
/// <summary>
/// default font, used if the printFont is not specified or if the
/// Default font, used if the printFont is not specified or if the
/// printFont is not fixed pitch.
/// </summary>
/// <remarks>
@ -300,12 +300,12 @@ namespace Microsoft.PowerShell.Commands.Internal.Format
private static readonly string s_defaultPrintFontName;
/// <summary>
/// default size for the default font
/// Default size for the default font.
/// </summary>
private const int DefaultPrintFontSize = 8;
/// <summary>
/// number of columns on the sheet
/// Number of columns on the sheet.
/// </summary>
private int _deviceColumns = 80;
@ -313,12 +313,12 @@ namespace Microsoft.PowerShell.Commands.Internal.Format
private int _deviceRows = 40;
/// <summary>
/// text lines ready to print (after output cache playback)
/// Text lines ready to print (after output cache playback).
/// </summary>
private Queue<string> _lines = new Queue<string>();
/// <summary>
/// cached font object
/// Cached font object.
/// </summary>
private Font _printFont = null;

View file

@ -7,13 +7,13 @@ using Microsoft.PowerShell.Commands.Internal.Format;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// implementation for the out-printer command
/// Implementation for the out-printer command.
/// </summary>
[Cmdlet(VerbsData.Out, "Printer", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113367")]
public class OutPrinterCommand : FrontEndCommandBase
{
/// <summary>
/// set inner command
/// Set inner command.
/// </summary>
public OutPrinterCommand()
{
@ -21,8 +21,8 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// optional name of the printer to print to
/// The alias allows "lp -P printer"
/// Optional name of the printer to print to.
/// The alias allows "lp -P printer".
/// </summary>
[Parameter(Position = 0)]
[Alias("PrinterName")]
@ -35,7 +35,7 @@ namespace Microsoft.PowerShell.Commands
private string _printerName;
/// <summary>
/// read command line parameters
/// Read command line parameters.
/// </summary>
protected override void BeginProcessing()
{
@ -49,8 +49,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// one time initialization: acquire a screen host interface
/// by creating one on top of a memory buffer
/// One-time initialization: acquire a screen host interface by creating one on top of a memory buffer.
/// </summary>
private LineOutput InstantiateLineOutputInterface()
{
@ -59,4 +58,3 @@ namespace Microsoft.PowerShell.Commands
}
}
}

View file

@ -10,7 +10,7 @@ using Microsoft.PowerShell.Commands.Internal.Format;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// implementation for the out-string command
/// Implementation for the out-string command.
/// </summary>
[Cmdlet(VerbsData.Out, "String", DefaultParameterSetName = "NoNewLineFormatting", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113368", RemotingCapability = RemotingCapability.None)]
[OutputType(typeof(string))]
@ -18,10 +18,9 @@ namespace Microsoft.PowerShell.Commands
{
#region Command Line Parameters
/// <summary>
/// optional, non positional parameter to specify the
/// streaming behavior
/// FALSE: accumulate all the data, then write a single string
/// TRUE: write one line at the time
/// Optional, non positional parameter to specify the streaming behavior.
/// FALSE: accumulate all the data, then write a single string.
/// TRUE: write one line at the time.
/// </summary>
[Parameter(ParameterSetName="StreamFormatting")]
public SwitchParameter Stream
@ -33,7 +32,7 @@ namespace Microsoft.PowerShell.Commands
private bool _stream;
/// <summary>
/// optional, number of columns to use when writing to device
/// Optional, number of columns to use when writing to device.
/// </summary>
[ValidateRangeAttribute(2, int.MaxValue)]
[Parameter]
@ -60,7 +59,7 @@ namespace Microsoft.PowerShell.Commands
#endregion
/// <summary>
/// set inner command
/// Set inner command.
/// </summary>
public OutStringCommand()
{
@ -68,7 +67,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// read command line parameters
/// Read command line parameters.
/// </summary>
protected override void BeginProcessing()
{
@ -82,8 +81,8 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// one time initialization: acquire a screen host interface
/// by creating one on top of a stream
/// One-time initialization: acquire a screen host interface
/// by creating one on top of a stream.
/// </summary>
private LineOutput InstantiateLineOutputInterface()
{
@ -109,8 +108,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// callback to add lines to the buffer or to write them to
/// the output stream
/// Callback to add lines to the buffer or to write them to the output stream.
/// </summary>
/// <param name="s"></param>
private void OnWriteLine(string s)
@ -133,7 +131,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// execution entry point
/// Execution entry point.
/// </summary>
protected override void ProcessRecord()
{
@ -142,7 +140,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// execution entry point
/// Execution entry point.
/// </summary>
protected override void EndProcessing()
{
@ -157,14 +155,13 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// writer used by the LineOutput
/// Writer used by the LineOutput.
/// </summary>
private StreamingTextWriter _writer = null;
/// <summary>
/// buffer used when buffering until the end
/// Buffer used when buffering until the end.
/// </summary>
private StringBuilder _buffer = new StringBuilder();
}
}

View file

@ -9,7 +9,7 @@ using System.Diagnostics.CodeAnalysis;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// Types of breakpoints
/// Types of breakpoints.
/// </summary>
public enum BreakpointType
{
@ -25,7 +25,7 @@ namespace Microsoft.PowerShell.Commands
};
/// <summary>
/// This class implements Remove-PSBreakpoint
/// This class implements Remove-PSBreakpoint.
/// </summary>
[Cmdlet(VerbsCommon.Get, "PSBreakpoint", DefaultParameterSetName = "Script", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113325")]
[OutputType(typeof(Breakpoint))]
@ -33,7 +33,7 @@ namespace Microsoft.PowerShell.Commands
{
#region parameters
/// <summary>
/// Scripts of the breakpoints to output
/// Scripts of the breakpoints to output.
/// </summary>
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "It's OK to use arrays for cmdlet parameters")]
[Parameter(ParameterSetName = "Script", Position = 0, ValueFromPipeline = true)]
@ -55,7 +55,7 @@ namespace Microsoft.PowerShell.Commands
private string[] _script;
/// <summary>
/// IDs of the breakpoints to output
/// IDs of the breakpoints to output.
/// </summary>
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "It's OK to use arrays for cmdlet parameters")]
[Parameter(ParameterSetName = "Id", Mandatory = true, Position = 0, ValueFromPipeline = true)]
@ -74,7 +74,7 @@ namespace Microsoft.PowerShell.Commands
private int[] _id;
/// <summary>
/// Variables of the breakpoints to output
/// Variables of the breakpoints to output.
/// </summary>
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "It's OK to use arrays for cmdlet parameters")]
[Parameter(ParameterSetName = "Variable", Mandatory = true)]
@ -93,7 +93,7 @@ namespace Microsoft.PowerShell.Commands
private string[] _variable;
/// <summary>
/// Commands of the breakpoints to output
/// Commands of the breakpoints to output.
/// </summary>
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "It's OK to use arrays for cmdlet parameters")]
[Parameter(ParameterSetName = "Command", Mandatory = true)]
@ -112,7 +112,7 @@ namespace Microsoft.PowerShell.Commands
private string[] _command;
/// <summary>
/// Commands of the breakpoints to output
/// Commands of the breakpoints to output.
/// </summary>
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "It's OK to use arrays for cmdlet parameters")]
[SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods", Justification = "Type is OK for a cmdlet parameter")]
@ -134,7 +134,7 @@ namespace Microsoft.PowerShell.Commands
#endregion parameters
/// <summary>
/// remove breakpoints
/// Remove breakpoints.
/// </summary>
protected override void ProcessRecord()
{
@ -291,4 +291,4 @@ namespace Microsoft.PowerShell.Commands
return output;
}
}
}
}

View file

@ -13,7 +13,7 @@ namespace Microsoft.PowerShell.Commands
public class GetPSCallStackCommand : PSCmdlet
{
/// <summary>
/// Get the call stack
/// Get the call stack.
/// </summary>
protected override void ProcessRecord()
{
@ -23,4 +23,4 @@ namespace Microsoft.PowerShell.Commands
}
}
}
}
}

View file

@ -11,7 +11,7 @@ using System.Diagnostics.CodeAnalysis;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// The implementation of the "get-alias" cmdlet
/// The implementation of the "get-alias" cmdlet.
/// </summary>
///
[Cmdlet(VerbsCommon.Get, "Alias", DefaultParameterSetName = "Default", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113306")]
@ -21,7 +21,7 @@ namespace Microsoft.PowerShell.Commands
#region Parameters
/// <summary>
/// The Name parameter for the command
/// The Name parameter for the command.
/// </summary>
///
[Parameter(ParameterSetName = "Default", Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true)]
@ -34,7 +34,7 @@ namespace Microsoft.PowerShell.Commands
private string[] _names = new string[] { "*" };
/// <summary>
/// The Exclude parameter for the command
/// The Exclude parameter for the command.
/// </summary>
///
[Parameter]

View file

@ -13,7 +13,7 @@ namespace Microsoft.PowerShell.Commands
public sealed class GetCultureCommand : PSCmdlet
{
/// <summary>
/// Output the current Culture info object
/// Output the current Culture info object.
/// </summary>
protected override void BeginProcessing()
{
@ -21,4 +21,3 @@ namespace Microsoft.PowerShell.Commands
}
}
}

View file

@ -12,7 +12,7 @@ namespace Microsoft.PowerShell.Commands
#region get-date
/// <summary>
/// implementation for the get-date command
/// Implementation for the get-date command.
/// </summary>
[Cmdlet(VerbsCommon.Get, "Date", DefaultParameterSetName = "net", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113313")]
[OutputType(typeof(string), ParameterSetName = new string[] { "UFormat", "net" })]
@ -22,7 +22,7 @@ namespace Microsoft.PowerShell.Commands
#region parameters
/// <summary>
/// Allows user to override the date/time object that will be processed
/// Allows user to override the date/time object that will be processed.
/// </summary>
[Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true)]
[Alias("LastWriteTime")]
@ -42,7 +42,7 @@ namespace Microsoft.PowerShell.Commands
private bool _dateSpecified;
/// <summary>
/// Allows the user to override the year
/// Allows the user to override the year.
/// </summary>
[Parameter]
[ValidateRangeAttribute(1, 9999)]
@ -62,7 +62,7 @@ namespace Microsoft.PowerShell.Commands
private bool _yearSpecified;
/// <summary>
/// Allows the user to override the month
/// Allows the user to override the month.
/// </summary>
[Parameter]
[ValidateRangeAttribute(1, 12)]
@ -82,7 +82,7 @@ namespace Microsoft.PowerShell.Commands
private bool _monthSpecified;
/// <summary>
/// Allows the user to override the day
/// Allows the user to override the day.
/// </summary>
[Parameter]
[ValidateRangeAttribute(1, 31)]
@ -102,7 +102,7 @@ namespace Microsoft.PowerShell.Commands
private bool _daySpecified;
/// <summary>
/// Allows the user to override the hour
/// Allows the user to override the hour.
/// </summary>
[Parameter]
[ValidateRangeAttribute(0, 23)]
@ -122,7 +122,7 @@ namespace Microsoft.PowerShell.Commands
private bool _hourSpecified;
/// <summary>
/// Allows the user to override the minute
/// Allows the user to override the minute.
/// </summary>
[Parameter]
[ValidateRangeAttribute(0, 59)]
@ -142,7 +142,7 @@ namespace Microsoft.PowerShell.Commands
private bool _minuteSpecified;
/// <summary>
/// Allows the user to override the second
/// Allows the user to override the second.
/// </summary>
[Parameter]
[ValidateRangeAttribute(0, 59)]
@ -162,7 +162,7 @@ namespace Microsoft.PowerShell.Commands
private bool _secondSpecified;
/// <summary>
/// Allows the user to override the millisecond
/// Allows the user to override the millisecond.
/// </summary>
[Parameter]
[ValidateRangeAttribute(0, 999)]
@ -182,20 +182,20 @@ namespace Microsoft.PowerShell.Commands
private bool _millisecondSpecified;
/// <summary>
/// This option determines the default output format used to display the object get-date emits
/// This option determines the default output format used to display the object get-date emits.
/// </summary>
[Parameter]
public DisplayHintType DisplayHint { get; set; } = DisplayHintType.DateTime;
/// <summary>
/// Unix format string
/// Unix format string.
/// </summary>
[Parameter(ParameterSetName = "UFormat")]
[ValidateNotNullOrEmpty]
public string UFormat { get; set; }
/// <summary>
/// Unix format string
/// Unix format string.
/// </summary>
[Parameter(ParameterSetName = "net")]
[ArgumentCompletions("FileDate", "FileDateUniversal", "FileDateTime", "FileDateTimeUniversal")]
@ -206,7 +206,7 @@ namespace Microsoft.PowerShell.Commands
#region methods
/// <summary>
/// get the time
/// Get the time.
/// </summary>
protected override void ProcessRecord()
{
@ -317,7 +317,7 @@ namespace Microsoft.PowerShell.Commands
private static readonly DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
/// <summary>
/// This is more an implementation of the UNIX strftime
/// This is more an implementation of the UNIX strftime.
/// </summary>
private string UFormatDateString(DateTime dateTime)
{
@ -534,23 +534,22 @@ namespace Microsoft.PowerShell.Commands
#region DisplayHintType enum
/// <summary>
/// Display Hint type
/// Display Hint type.
/// </summary>
public enum DisplayHintType
{
/// <summary>
/// Display preference Date-Only
/// Display preference Date-Only.
/// </summary>
Date,
/// <summary>
/// Display preference Time-Only
/// Display preference Time-Only.
/// </summary>
Time,
/// <summary>
/// Display preference Date and Time
/// Display preference Date and Time.
/// </summary>
DateTime
}
#endregion
}

View file

@ -17,7 +17,7 @@ namespace Microsoft.PowerShell.Commands
#region parameters
/// <summary>
/// An identifier for this event subscription
/// An identifier for this event subscription.
/// </summary>
[Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = "BySource")]
[ValidateNotNullOrEmpty()]
@ -40,7 +40,7 @@ namespace Microsoft.PowerShell.Commands
private string _sourceIdentifier = null;
/// <summary>
/// An identifier for this event subscription
/// An identifier for this event subscription.
/// </summary>
[Parameter(Mandatory = true, Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = "ById")]
[Alias("Id")]
@ -62,7 +62,7 @@ namespace Microsoft.PowerShell.Commands
private WildcardPattern _matchPattern;
/// <summary>
/// Get the requested events
/// Get the requested events.
/// </summary>
protected override void EndProcessing()
{
@ -131,4 +131,4 @@ namespace Microsoft.PowerShell.Commands
}
}
}
}
}

View file

@ -17,7 +17,7 @@ namespace Microsoft.PowerShell.Commands
#region parameters
/// <summary>
/// An identifier for this event subscription
/// An identifier for this event subscription.
/// </summary>
[Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = "BySource")]
[ValidateNotNullOrEmpty()]
@ -40,14 +40,14 @@ namespace Microsoft.PowerShell.Commands
private string _sourceIdentifier = null;
/// <summary>
/// An identifier for this event subscription
/// An identifier for this event subscription.
/// </summary>
[Parameter(Mandatory = true, Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = "ById")]
[Alias("Id")]
public int SubscriptionId { get; set; } = -1;
/// <summary>
/// Also show supporting events
/// Also show supporting events.
/// </summary>
[Parameter(Position = 1)]
public SwitchParameter Force { get; set; }
@ -57,7 +57,7 @@ namespace Microsoft.PowerShell.Commands
private WildcardPattern _matchPattern;
/// <summary>
/// Get the subscribers
/// Get the subscribers.
/// </summary>
protected override void ProcessRecord()
{
@ -127,4 +127,4 @@ namespace Microsoft.PowerShell.Commands
}
}
}
}
}

View file

@ -11,16 +11,16 @@ using System.IO;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// This class implements Get-FileHash
/// This class implements Get-FileHash.
/// </summary>
[Cmdlet(VerbsCommon.Get, "FileHash", DefaultParameterSetName = PathParameterSet, HelpUri = "https://go.microsoft.com/fwlink/?LinkId=517145")]
[OutputType(typeof(FileHashInfo))]
public class GetFileHashCommand : HashCmdletBase
{
/// <summary>
/// Path parameter
/// The paths of the files to calculate a hashs
/// Resolved wildcards
/// Path parameter.
/// The paths of the files to calculate a hashs.
/// Resolved wildcards.
/// </summary>
/// <value></value>
[Parameter(Mandatory = true, ParameterSetName = PathParameterSet, Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true)]
@ -37,9 +37,9 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// LiteralPath parameter
/// The literal paths of the files to calculate a hashs
/// Don't resolved wildcards
/// LiteralPath parameter.
/// The literal paths of the files to calculate a hashs.
/// Don't resolved wildcards.
/// </summary>
/// <value></value>
[Parameter(Mandatory = true, ParameterSetName = LiteralPathParameterSet, Position = 0, ValueFromPipelineByPropertyName = true)]
@ -59,16 +59,16 @@ namespace Microsoft.PowerShell.Commands
private String[] _paths;
/// <summary>
/// InputStream parameter
/// The stream of the file to calculate a hash
/// InputStream parameter.
/// The stream of the file to calculate a hash.
/// </summary>
/// <value></value>
[Parameter(Mandatory = true, ParameterSetName = StreamParameterSet, Position = 0)]
public Stream InputStream { get; set; }
/// <summary>
/// BeginProcessing() override
/// This is for hash function init
/// BeginProcessing() override.
/// This is for hash function init.
/// </summary>
protected override void BeginProcessing()
{
@ -76,8 +76,8 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// ProcessRecord() override
/// This is for paths collecting from pipe
/// ProcessRecord() override.
/// This is for paths collecting from pipe.
/// </summary>
protected override void ProcessRecord()
{
@ -150,8 +150,8 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Perform common error checks
/// Populate source code
/// Perform common error checks.
/// Populate source code.
/// </summary>
protected override void EndProcessing()
{
@ -168,7 +168,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Create FileHashInfo object and output it
/// Create FileHashInfo object and output it.
/// </summary>
private void WriteHashResult(string Algorithm, string hash, string path)
{
@ -180,7 +180,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Parameter set names
/// Parameter set names.
/// </summary>
private const string PathParameterSet = "Path";
private const string LiteralPathParameterSet = "LiteralPath";
@ -189,13 +189,13 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Base Cmdlet for cmdlets which deal with crypto hashes
/// Base Cmdlet for cmdlets which deal with crypto hashes.
/// </summary>
public class HashCmdletBase : PSCmdlet
{
/// <summary>
/// Algorithm parameter
/// The hash algorithm name: "SHA1", "SHA256", "SHA384", "SHA512", "MD5"
/// Algorithm parameter.
/// The hash algorithm name: "SHA1", "SHA256", "SHA384", "SHA512", "MD5".
/// </summary>
/// <value></value>
[Parameter(Position = 1)]
@ -221,12 +221,12 @@ namespace Microsoft.PowerShell.Commands
private String _Algorithm = HashAlgorithmNames.SHA256;
/// <summary>
/// Hash algorithm is used
/// Hash algorithm is used.
/// </summary>
protected HashAlgorithm hasher;
/// <summary>
/// Hash algorithm names
/// Hash algorithm names.
/// </summary>
internal static class HashAlgorithmNames
{
@ -238,7 +238,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Init a hash algorithm
/// Init a hash algorithm.
/// </summary>
protected void InitHasher(String Algorithm)
{
@ -273,22 +273,22 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// FileHashInfo class contains information about a file hash
/// FileHashInfo class contains information about a file hash.
/// </summary>
public class FileHashInfo
{
/// <summary>
/// Hash algorithm name
/// Hash algorithm name.
/// </summary>
public string Algorithm { get; set;}
/// <summary>
/// Hash value
/// Hash value.
/// </summary>
public string Hash { get; set;}
/// <summary>
/// File path
/// File path.
/// </summary>
public string Path { get; set;}
}

View file

@ -9,7 +9,7 @@ namespace Microsoft.PowerShell.Commands
{
/// <summary>
///
/// Writes the PSHost object to the success stream
/// Writes the PSHost object to the success stream.
///
/// </summary>
@ -20,7 +20,7 @@ namespace Microsoft.PowerShell.Commands
{
/// <summary>
///
/// See base class
/// See base class.
///
/// </summary>
protected override void BeginProcessing()
@ -29,4 +29,3 @@ namespace Microsoft.PowerShell.Commands
}
}
}

View file

@ -11,19 +11,19 @@ using System.Reflection;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// Class with member information that this cmdlet writes to the pipeline
/// Class with member information that this cmdlet writes to the pipeline.
/// </summary>
public class MemberDefinition
{
/// <summary>
/// returns the member definition
/// Returns the member definition.
/// </summary>
public override string ToString()
{
return Definition;
}
/// <summary>
/// Initializes a new instance of this class
/// Initializes a new instance of this class.
/// </summary>
public MemberDefinition(string typeName, string name, PSMemberTypes memberType, string definition)
{
@ -34,22 +34,22 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// type name
/// Type name.
/// </summary>
public string TypeName { get; }
/// <summary>
/// member name
/// Member name.
/// </summary>
public string Name { get; }
/// <summary>
/// member type
/// Member type.
/// </summary>
public PSMemberTypes MemberType { get; }
/// <summary>
/// member definition
/// Member definition.
/// </summary>
public string Definition { get; }
}
@ -62,20 +62,20 @@ namespace Microsoft.PowerShell.Commands
public class GetMemberCommand : PSCmdlet
{
/// <summary>
/// The object to retrieve properties from
/// The object to retrieve properties from.
/// </summary>
[Parameter(ValueFromPipeline = true)]
public PSObject InputObject { set; get; }
/// <summary>
/// The member names to be retrieved
/// The member names to be retrieved.
/// </summary>
[Parameter(Position = 0)]
[ValidateNotNullOrEmpty]
public string[] Name { set; get; } = new string[] { "*" };
/// <summary>
/// The member types to be retrieved
/// The member types to be retrieved.
/// </summary>
[Parameter]
[Alias("Type")]
@ -89,7 +89,7 @@ namespace Microsoft.PowerShell.Commands
private bool _staticParameter = false;
/// <summary>
/// True if we should return static members
/// True if we should return static members.
/// </summary>
[Parameter]
public SwitchParameter Static
@ -99,14 +99,13 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Gets or sets the force property
/// Gets or sets the force property.
/// </summary>
/// <remarks>
/// Gives the Member matcher guidance on how vigorous the Match should be.
/// If set to true all members in a given view + membertype are displayed.
/// This parameter is added to hide Get/Set property accessor methods by
/// default. If a user wants to see these methods, -force should be set to
/// true.
/// This parameter is added to hide Get/Set property accessor methods by default.
/// If a user wants to see these methods, -force should be set to true.
/// </remarks>
[Parameter]
public SwitchParameter Force
@ -133,7 +132,7 @@ namespace Microsoft.PowerShell.Commands
private HybridDictionary _typesAlreadyDisplayed = new HybridDictionary();
/// <summary>
/// This method implements the ProcessRecord method for get-member command
/// This method implements the ProcessRecord method for get-member command.
/// </summary>
protected override void ProcessRecord()
{
@ -261,7 +260,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// This method implements the End method for get-member command
/// This method implements the End method for get-member command.
/// </summary>
protected override void EndProcessing()
{
@ -277,4 +276,3 @@ namespace Microsoft.PowerShell.Commands
}
}
}

View file

@ -131,7 +131,7 @@ namespace Microsoft.PowerShell.Commands
private PolymorphicRandomNumberGenerator _generator;
/// <summary>
/// Gets and sets generator associated with the current runspace
/// Gets and sets generator associated with the current runspace.
/// </summary>
private PolymorphicRandomNumberGenerator Generator
{
@ -187,7 +187,7 @@ namespace Microsoft.PowerShell.Commands
#region Common parameters
/// <summary>
/// Seed used to reinitialize random numbers generator
/// Seed used to reinitialize random numbers generator.
/// </summary>
[Parameter]
[ValidateNotNull]
@ -198,13 +198,13 @@ namespace Microsoft.PowerShell.Commands
#region Parameters for RandomNumberParameterSet
/// <summary>
/// Maximum number to generate
/// Maximum number to generate.
/// </summary>
[Parameter(ParameterSetName = RandomNumberParameterSet, Position = 0)]
public object Maximum { get; set; }
/// <summary>
/// Minimum number to generate
/// Minimum number to generate.
/// </summary>
[Parameter(ParameterSetName = RandomNumberParameterSet)]
public object Minimum { get; set; }
@ -266,7 +266,7 @@ namespace Microsoft.PowerShell.Commands
private int _numberOfProcessedListItems;
/// <summary>
/// List from which random elements are chosen
/// List from which random elements are chosen.
/// </summary>
[Parameter(ParameterSetName = RandomListItemParameterSet, ValueFromPipeline = true, Position = 0, Mandatory = true)]
[ValidateNotNullOrEmpty]
@ -274,7 +274,7 @@ namespace Microsoft.PowerShell.Commands
public object[] InputObject { get; set; }
/// <summary>
/// Number of items to output (number of list items or of numbers)
/// Number of items to output (number of list items or of numbers).
/// </summary>
[Parameter(ParameterSetName = GetRandomCommand.RandomListItemParameterSet)]
[ValidateRange(1, int.MaxValue)]
@ -321,7 +321,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Get a random Int64 type number
/// Get a random Int64 type number.
/// </summary>
/// <param name="min"></param>
/// <param name="max"></param>
@ -367,7 +367,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// This method implements the BeginProcessing method for get-random command
/// This method implements the BeginProcessing method for get-random command.
/// </summary>
protected override void BeginProcessing()
{
@ -474,7 +474,7 @@ namespace Microsoft.PowerShell.Commands
// which proves that P_final(I) = K / N for all values of I. QED.
/// <summary>
/// This method implements the ProcessRecord method for get-random command
/// This method implements the ProcessRecord method for get-random command.
/// </summary>
protected override void ProcessRecord()
{
@ -503,7 +503,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// This method implements the EndProcessing method for get-random command
/// This method implements the EndProcessing method for get-random command.
/// </summary>
protected override void EndProcessing()
{
@ -547,7 +547,7 @@ namespace Microsoft.PowerShell.Commands
internal class PolymorphicRandomNumberGenerator
{
/// <summary>
/// Constructor
/// Constructor.
/// </summary>
public PolymorphicRandomNumberGenerator()
{
@ -659,7 +659,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Samples a random integer
/// Samples a random integer.
/// </summary>
/// <returns>A random integer, using the full range of Int32</returns>
private int InternalSample()
@ -676,7 +676,7 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// Samples a random int when the range is large. This does
/// not need to be in the range of -Double.MaxValue .. Double.MaxValue,
/// just 0.. (2 * Int32.MaxValue) - 1
/// just 0.. (2 * Int32.MaxValue) - 1 .
/// </summary>
/// <returns></returns>
private double InternalSampleLargeRange()

View file

@ -72,7 +72,7 @@ namespace Microsoft.PowerShell.Commands
#region Overrides
/// <summary>
/// Process record
/// Process record.
/// </summary>
protected override void ProcessRecord()
{

View file

@ -13,7 +13,7 @@ namespace Microsoft.PowerShell.Commands
public sealed class GetUICultureCommand : PSCmdlet
{
/// <summary>
/// Output the current UI Culture info object
/// Output the current UI Culture info object.
/// </summary>
protected override void BeginProcessing()
{

View file

@ -114,4 +114,3 @@ namespace Microsoft.PowerShell.Commands
#endregion Internal
}
}

View file

@ -9,7 +9,7 @@ using System.Management.Automation.Internal;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// This class implements Get-Uptime
/// This class implements Get-Uptime.
/// </summary>
[Cmdlet(VerbsCommon.Get, "Uptime", DefaultParameterSetName = TimespanParameterSet, HelpUri = "https://go.microsoft.com/fwlink/?linkid=834862")]
[OutputType(typeof(TimeSpan), ParameterSetName = new string[] { TimespanParameterSet })]
@ -17,16 +17,14 @@ namespace Microsoft.PowerShell.Commands
public class GetUptimeCommand : PSCmdlet
{
/// <summary>
/// Since parameter
/// The system startup time
/// The system startup time.
/// </summary>
/// <value></value>
[Parameter(ParameterSetName = SinceParameterSet)]
public SwitchParameter Since { get; set; } = new SwitchParameter();
/// <summary>
/// ProcessRecord() override
/// This is the main entry point for the cmdlet
/// This is the main entry point for the cmdlet.
/// </summary>
protected override void ProcessRecord()
{

View file

@ -11,14 +11,14 @@ namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// Implementation of the Get Verb Command
/// Implementation of the Get Verb Command.
/// </summary>
[Cmdlet(VerbsCommon.Get, "Verb", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=160712")]
[OutputType(typeof(VerbInfo))]
public class GetVerbCommand : Cmdlet
{
/// <summary>
/// Optional Verb filter
/// Optional Verb filter.
/// </summary>
[Parameter(ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, Position = 0)]
public string[] Verb
@ -27,7 +27,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Optional Group filter
/// Optional Group filter.
/// </summary>
[Parameter(ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, Position = 1)]
[ValidateSet("Common", "Communications", "Data", "Diagnostic", "Lifecycle", "Other", "Security")]
@ -37,7 +37,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Returns a list of verbs
/// Returns a list of verbs.
/// </summary>
protected override void ProcessRecord()
{

View file

@ -31,7 +31,7 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// This class implements Export-PSSession cmdlet.
/// Spec: TBD
/// Spec: TBD.
/// </summary>
[Cmdlet(VerbsData.Export, "PSSession", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=135213")]
[OutputType(typeof(FileInfo))]
@ -40,15 +40,15 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// Version of the script generator used (by this Export-PSSession cmdlet) to generate psm1 and psd1 files.
/// Generated script checks this version to see if it needs to be regenerated. There are 2 situations where this is needed
/// 1. the script needs to be regenerated because a bug fix made previous versions incompatible with the rest of the system (i.e. with ObjectModelWrapper)
/// 2. ths script needs to be regenerated because a security vulnerability was found inside generated code (there is no way to service generated code, but we can service the dll that reports the version that the generated script checks against)
/// 1. the script needs to be regenerated because a bug fix made previous versions incompatible with the rest of the system (i.e. with ObjectModelWrapper).
/// 2. ths script needs to be regenerated because a security vulnerability was found inside generated code (there is no way to service generated code, but we can service the dll that reports the version that the generated script checks against).
/// </summary>
public static Version VersionOfScriptGenerator { get { return ImplicitRemotingCodeGenerator.VersionOfScriptWriter; } }
#region Parameters
/// <summary>
/// Mandatory file name to write to
/// Mandatory file name to write to.
/// </summary>
[Parameter(Mandatory = true, Position = 1)]
[ValidateNotNullOrEmpty]
@ -73,7 +73,7 @@ namespace Microsoft.PowerShell.Commands
private bool _force;
/// <summary>
/// Encoding optional flag
/// Encoding optional flag.
/// </summary>
[Parameter]
[ArgumentToEncodingTransformationAttribute()]
@ -162,7 +162,7 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// This class implements Import-PSSession cmdlet.
/// Spec: http://cmdletdesigner/SpecViewer/Default.aspx?Project=PowerShell&amp;Cmdlet=Import-Command
/// Spec: http://cmdletdesigner/SpecViewer/Default.aspx?Project=PowerShell&amp;Cmdlet=Import-Command .
/// </summary>
[Cmdlet(VerbsData.Import, "PSSession", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=135221")]
[OutputType(typeof(PSModuleInfo))]
@ -250,7 +250,7 @@ namespace Microsoft.PowerShell.Commands
#region Extra parameters
/// <summary>
/// This parameter specified a prefix used to modify names of imported commands
/// This parameter specified a prefix used to modify names of imported commands.
/// </summary>
[Parameter]
[ValidateNotNullOrEmpty]
@ -323,7 +323,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Base class for implicit remoting cmdlets
/// Base class for implicit remoting cmdlets.
/// </summary>
public class ImplicitRemotingCommandBase : PSCmdlet
{
@ -349,7 +349,7 @@ namespace Microsoft.PowerShell.Commands
#region related to Get-Command
/// <summary>
/// Gets or sets the path(s) or name(s) of the commands to retrieve
/// Gets or sets the path(s) or name(s) of the commands to retrieve.
/// </summary>
[Parameter(Position = 2)]
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
@ -373,7 +373,7 @@ namespace Microsoft.PowerShell.Commands
private Collection<WildcardPattern> _commandNamePatterns; // initialized to default value in the constructor
/// <summary>
/// Allows shadowing and/or overwriting of existing local/client commands
/// Allows shadowing and/or overwriting of existing local/client commands.
/// </summary>
[Parameter]
public SwitchParameter AllowClobber { get; set; } = new SwitchParameter(false);
@ -402,7 +402,7 @@ namespace Microsoft.PowerShell.Commands
private object[] _commandArgs;
/// <summary>
/// Gets or sets the type of the command to get
/// Gets or sets the type of the command to get.
/// </summary>
[Parameter]
[Alias("Type")]
@ -422,7 +422,7 @@ namespace Microsoft.PowerShell.Commands
private CommandTypes _commandType = CommandTypes.All & (~(CommandTypes.Application | CommandTypes.Script | CommandTypes.ExternalScript));
/// <summary>
/// Gets or sets the PSSnapin parameter to the cmdlet
/// Gets or sets the PSSnapin parameter to the cmdlet.
/// </summary>
[Parameter]
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
@ -450,7 +450,7 @@ namespace Microsoft.PowerShell.Commands
private string[] _PSSnapins = new string[0];
internal bool IsModuleSpecified = false;
/// <summary>
/// Gets or sets the FullyQualifiedModule parameter to the cmdlet
/// Gets or sets the FullyQualifiedModule parameter to the cmdlet.
/// </summary>
[Parameter]
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
@ -482,7 +482,7 @@ namespace Microsoft.PowerShell.Commands
#region related to F&O
/// <summary>
/// Gets or sets the types for which we should get formatting and output data
/// Gets or sets the types for which we should get formatting and output data.
/// </summary>
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
[Parameter(Position = 3)]
@ -510,7 +510,7 @@ namespace Microsoft.PowerShell.Commands
#region Related to modules
/// <summary>
/// This parameter specified a prefix used to modify names of imported commands
/// This parameter specified a prefix used to modify names of imported commands.
/// </summary>
internal string Prefix { set; get; } = string.Empty;
@ -524,7 +524,7 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// The PSSession object describing the remote runspace
/// using which the specified cmdlet operation will be performed
/// using which the specified cmdlet operation will be performed.
/// </summary>
[Parameter(Mandatory = true, Position = 0)]
[ValidateNotNull]
@ -865,7 +865,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Returns true if command doesn't shadow OR is in the -AllowShadowing parameter
/// Returns true if command doesn't shadow OR is in the -AllowShadowing parameter.
/// </summary>
/// <param name="commandName"></param>
/// <returns></returns>
@ -1089,7 +1089,7 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// Validates that a name or identifier is safe to use in generated code
/// (i.e. it can't be used for code injection attacks)
/// (i.e. it can't be used for code injection attacks).
/// </summary>
/// <param name="name">name to validate</param>
/// <returns><c>true</c> if the name is safe; <c>false</c> otherwise</returns>
@ -1107,7 +1107,7 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// Validates that a parameter name is safe to use in generated code
/// (i.e. it can't be used for code injection attacks)
/// (i.e. it can't be used for code injection attacks).
/// </summary>
/// <param name="parameterName">parameter name to validate</param>
/// <returns><c>true</c> if the name is safe; <c>false</c> otherwise</returns>
@ -1118,7 +1118,7 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// Validates that a type can be safely used as a type constraint
/// (i.e. it doesn't introduce any side effects on the client)
/// (i.e. it doesn't introduce any side effects on the client).
/// </summary>
/// <param name="type">type to validate</param>
/// <returns><c>true</c> if the type is safe; <c>false</c> otherwise</returns>
@ -1379,7 +1379,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Converts remote (deserialized) CommandInfo objects into CommandMetadata equivalents
/// Converts remote (deserialized) CommandInfo objects into CommandMetadata equivalents.
/// </summary>
/// <param name="name2commandMetadata">Dictionary where rehydrated CommandMetadata are going to be stored</param>
/// <param name="alias2resolvedCommandName">Dictionary mapping alias names to resolved command names</param>
@ -1576,7 +1576,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Gets CommandMetadata objects from remote runspace
/// Gets CommandMetadata objects from remote runspace.
/// </summary>
/// <returns>(rehydrated) CommandMetadata objects</returns>
internal List<ExtendedTypeDefinition> GetRemoteFormatData()
@ -1676,7 +1676,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Gets CommandMetadata objects from remote runspace
/// Gets CommandMetadata objects from remote runspace.
/// </summary>
/// <returns>(rehydrated) CommandMetadata objects</returns>
internal List<CommandMetadata> GetRemoteCommandMetadata(out Dictionary<string, string> alias2resolvedCommandName)
@ -1919,7 +1919,7 @@ namespace Microsoft.PowerShell.Commands
#region Code generation helpers
/// <summary>
/// Gets a connection URI associated with the remote runspace
/// Gets a connection URI associated with the remote runspace.
/// </summary>
/// <returns>Connection URI associated with the remote runspace</returns>
private string GetConnectionString()

View file

@ -11,7 +11,7 @@ using System.Diagnostics.CodeAnalysis;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// The implementation of the "import-localizeddata" cmdlet
/// The implementation of the "import-localizeddata" cmdlet.
/// </summary>
///
[Cmdlet(VerbsData.Import, "LocalizedData", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113342")]
@ -20,7 +20,7 @@ namespace Microsoft.PowerShell.Commands
#region Parameters
/// <summary>
/// The path from which to import the aliases
/// The path from which to import the aliases.
/// </summary>
///
[Parameter(Position = 0)]
@ -98,8 +98,7 @@ namespace Microsoft.PowerShell.Commands
private string _fileName;
/// <summary>
/// The command allowed in the data file. If unspecified, then ConvertFrom-StringData
/// is allowed.
/// The command allowed in the data file. If unspecified, then ConvertFrom-StringData is allowed.
/// </summary>
[Parameter]
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Cmdlets use arrays for parameters.")]

View file

@ -12,7 +12,7 @@ using System.Security;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// The implementation of the "import-alias" cmdlet
/// The implementation of the "import-alias" cmdlet.
/// </summary>
///
[Cmdlet(VerbsData.Import, "Alias", SupportsShouldProcess = true, DefaultParameterSetName = "ByPath", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113339")]
@ -28,14 +28,14 @@ namespace Microsoft.PowerShell.Commands
#region Parameters
/// <summary>
/// The path from which to import the aliases
/// The path from which to import the aliases.
/// </summary>
///
[Parameter(Position = 0, Mandatory = true, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "ByPath")]
public string Path { get; set; }
/// <summary>
/// The literal path from which to import the aliases
/// The literal path from which to import the aliases.
/// </summary>
///
[Parameter(Mandatory = true, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = LiteralPathParameterSetName)]
@ -62,8 +62,7 @@ namespace Microsoft.PowerShell.Commands
public string Scope { get; set; }
/// <summary>
/// If set to true, the alias that is set is passed to the
/// pipeline.
/// If set to true, the alias that is set is passed to the pipeline.
/// </summary>
///
[Parameter]

View file

@ -18,7 +18,7 @@ namespace Microsoft.PowerShell.Commands
bool _isLiteralPath;
/// <summary>
/// Path specified, using globbing to resolve
/// Path specified, using globbing to resolve.
/// </summary>
[Parameter(Mandatory = true, Position = 0, ParameterSetName = "ByPath")]
[ValidateNotNullOrEmpty]
@ -26,7 +26,7 @@ namespace Microsoft.PowerShell.Commands
public string[] Path { get; set; }
/// <summary>
/// Specifies a path to one or more locations, without globbing
/// Specifies a path to one or more locations, without globbing.
/// </summary>
[Parameter(Mandatory = true, Position = 0, ParameterSetName = "ByLiteralPath", ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
@ -39,8 +39,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// For each path, resolve it, parse it and write all hashtables
/// to the output stream
/// For each path, resolve it, parse it and write all hashtables to the output stream.
/// </summary>
protected override void ProcessRecord()
{

View file

@ -7,7 +7,7 @@ using System.Management.Automation.Internal;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// Class implementing Invoke-Expression
/// Class implementing Invoke-Expression.
/// </summary>
[Cmdlet(VerbsLifecycle.Invoke, "Expression", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113343")]
public sealed
@ -25,8 +25,7 @@ namespace Microsoft.PowerShell.Commands
#endregion parameters
/// <summary>
/// For each record, execute it, and push the results into the
/// success stream.
/// For each record, execute it, and push the results into the success stream.
/// </summary>
protected override void ProcessRecord()
{
@ -53,4 +52,4 @@ namespace Microsoft.PowerShell.Commands
args: emptyArray);
}
}
} // namespace Microsoft.PowerShell.Commands
}

View file

@ -146,8 +146,7 @@ namespace Microsoft.PowerShell.Commands
public string Pattern { get; set; }
/// <summary>
/// The context for the match, or null if -context was not
/// specified.
/// The context for the match, or null if -context was not specified.
/// </summary>
public MatchInfoContext Context { get; set; }
@ -155,7 +154,7 @@ namespace Microsoft.PowerShell.Commands
/// Returns the path of the matching file truncated relative to the <paramref name="directory"/> parameter.
/// <remarks>
/// For example, if the matching path was c:\foo\bar\baz.c and the directory argument was c:\foo
/// the routine would return bar\baz.c
/// the routine would return bar\baz.c .
/// </remarks>
/// </summary>
/// <param name="directory">The directory base the truncation on.</param>
@ -674,7 +673,7 @@ namespace Microsoft.PowerShell.Commands
/// a possibly-continuous set of matches by excluding
/// overlapping context (lines will only appear once)
/// and other matching lines (since they will appear
/// as their own match entries.)
/// as their own match entries.).
/// </remarks>
private class LogicalContextTracker : IContextTracker
{
@ -846,8 +845,7 @@ namespace Microsoft.PowerShell.Commands
/// and adds it to the emit queue.
/// </summary>
/// <remarks>
/// Context ranges must be within the bounds of the context
/// buffer.
/// Context ranges must be within the bounds of the context buffer.
/// </remarks>
/// <param name="match">The match to operate on.</param>
/// <param name="preStartIndex">The start index of the precontext range.</param>
@ -957,7 +955,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// This parameter specifies the current pipeline object
/// This parameter specifies the current pipeline object.
/// </summary>
[Parameter(ValueFromPipeline = true, Mandatory = true, ParameterSetName = "Object")]
[AllowNull]
@ -977,27 +975,24 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// String index to start from the beginning.
///
/// If the value is negative, the length is counted from the
/// end of the string.
/// If the value is negative, the length is counted from the end of the string.
/// </summary>
///
[Parameter(Mandatory = true, Position = 0)]
public string[] Pattern { get; set; }
private Regex[] _regexPattern;
/// <summary>
/// file to read from
/// Globbing is done on these
/// File to read from.
/// Globbing is done on these.
/// </summary>
[Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "File")]
[FileinfoToString]
public string[] Path { get; set; }
/// <summary>
/// Literal file to read from
/// Globbing is not done on these
/// Literal file to read from.
/// Globbing is not done on these.
/// </summary>
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "LiteralFile")]
[FileinfoToString]
@ -1017,8 +1012,9 @@ namespace Microsoft.PowerShell.Commands
}
private bool _isLiteralPath = false;
/// <summary> If set, match pattern string literally.
/// If not (default) search using pattern as a Regular Expression
/// <summary>
/// If set, match pattern string literally.
/// If not (default) search using pattern as a Regular Expression.
/// </summary>
[Parameter]
public SwitchParameter SimpleMatch
@ -1178,7 +1174,6 @@ namespace Microsoft.PowerShell.Commands
/// If set, sets the Matches property of MatchInfo to the result
/// of calling System.Text.RegularExpressions.Regex.Matches() on
/// the corresponding line.
///
/// Has no effect if -SimpleMatch is also specified.
/// </summary>
[Parameter]
@ -1303,11 +1298,9 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// process the input
/// Process the input.
/// </summary>
///
/// <returns> Does not return a value </returns>
///
/// <exception cref="ArgumentException">Regular expression parsing error, path error</exception>
/// <exception cref="FileNotFoundException">A file cannot be found.</exception>
/// <exception cref="DirectoryNotFoundException">A file cannot be found.</exception>
@ -1500,8 +1493,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Emit any objects which have been queued up, and clear
/// the queue.
/// Emit any objects which have been queued up, and clear the queue.
/// </summary>
/// <param name="contextTracker">The context tracker to operate on.</param>
/// <returns>Whether or not any objects were emitted.</returns>
@ -1581,8 +1573,7 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// Check the operand and see if it matches, if this.quiet is not set, then
/// return a partially populated MatchInfo object with Line, Pattern, IgnoreCase
/// set.
/// return a partially populated MatchInfo object with Line, Pattern, IgnoreCase set.
/// </summary>
/// <param name="matchInfo"></param>
/// <param name="matchResult">the match info object - this will be

View file

@ -12,25 +12,25 @@ using Microsoft.PowerShell.Commands.Internal.Format;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// Class output by Measure-Object
/// Class output by Measure-Object.
/// </summary>
public abstract class MeasureInfo
{
/// <summary>
///
/// property name
/// Property name.
///
/// </summary>
public string Property { get; set; } = null;
}
/// <summary>
/// Class output by Measure-Object
/// Class output by Measure-Object.
/// </summary>
public sealed class GenericMeasureInfo : MeasureInfo
{
/// <summary>
/// default ctor
/// Default ctor.
/// </summary>
public GenericMeasureInfo()
{
@ -38,37 +38,27 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
///
/// Keeping track of number of objects with a certain property
///
/// Keeping track of number of objects with a certain property.
/// </summary>
public int Count { get; set; }
/// <summary>
///
/// The average of property values
///
/// The average of property values.
/// </summary>
public double? Average { get; set; }
/// <summary>
///
/// The sum of property values
///
/// The sum of property values.
/// </summary>
public double? Sum { get; set; }
/// <summary>
///
/// The max of property values
///
/// The max of property values.
/// </summary>
public double? Maximum { get; set; }
/// <summary>
///
/// The min of property values
///
/// The min of property values.
/// </summary>
public double? Minimum { get; set; }
@ -90,7 +80,7 @@ namespace Microsoft.PowerShell.Commands
public sealed class GenericObjectMeasureInfo : MeasureInfo
{
/// <summary>
/// default ctor
/// Default ctor.
/// </summary>
public GenericObjectMeasureInfo()
{
@ -100,35 +90,35 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
///
/// Keeping track of number of objects with a certain property
/// Keeping track of number of objects with a certain property.
///
/// </summary>
public int Count { get; set; }
/// <summary>
///
/// The average of property values
/// The average of property values.
///
/// </summary>
public double? Average { get; set; }
/// <summary>
///
/// The sum of property values
/// The sum of property values.
///
/// </summary>
public double? Sum { get; set; }
/// <summary>
///
/// The max of property values
/// The max of property values.
///
/// </summary>
public object Maximum { get; set; }
/// <summary>
///
/// The min of property values
/// The min of property values.
///
/// </summary>
public object Minimum { get; set; }
@ -140,12 +130,12 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Class output by Measure-Object
/// Class output by Measure-Object.
/// </summary>
public sealed class TextMeasureInfo : MeasureInfo
{
/// <summary>
/// default ctor
/// Default ctor.
/// </summary>
public TextMeasureInfo()
{
@ -153,29 +143,23 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
///
/// Keeping track of number of objects with a certain property
///
/// Keeping track of number of objects with a certain property.
/// </summary>
public int? Lines { get; set; }
/// <summary>
///
/// The average of property values
///
/// The average of property values.
/// </summary>
public int? Words { get; set; }
/// <summary>
///
/// The sum of property values
///
/// The sum of property values.
/// </summary>
public int? Characters { get; set; }
}
/// <summary>
/// measure object cmdlet
/// Measure object cmdlet.
/// </summary>
[Cmdlet(VerbsDiagnostic.Measure, "Object", DefaultParameterSetName = GenericParameterSet,
HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113349", RemotingCapability = RemotingCapability.None)]
@ -183,7 +167,7 @@ namespace Microsoft.PowerShell.Commands
public sealed class MeasureObjectCommand : PSCmdlet
{
/// <summary>
/// Dictionary to be used by Measure-Object implementation
/// Dictionary to be used by Measure-Object implementation.
/// Keys are strings. Keys are compared with OrdinalIgnoreCase.
/// </summary>
/// <typeparam name="V">Value type.</typeparam>
@ -191,7 +175,7 @@ namespace Microsoft.PowerShell.Commands
where V : new()
{
/// <summary>
/// default ctor
/// Default ctor.
/// </summary>
internal MeasureObjectDictionary() : base(StringComparer.OrdinalIgnoreCase)
{
@ -246,7 +230,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// default constructor
/// Default constructor.
/// </summary>
public MeasureObjectCommand()
: base()
@ -258,14 +242,14 @@ namespace Microsoft.PowerShell.Commands
#region Common parameters in both sets
/// <summary>
/// incoming object
/// Incoming object.
/// </summary>
/// <value></value>
[Parameter(ValueFromPipeline = true)]
public PSObject InputObject { set; get; } = AutomationNull.Value;
/// <summary>
/// Properties to be examined
/// Properties to be examined.
/// </summary>
/// <value></value>
[ValidateNotNullOrEmpty]
@ -293,7 +277,7 @@ namespace Microsoft.PowerShell.Commands
private bool _measureStandardDeviation;
/// <summary>
/// Set to true is Sum is to be returned
/// Set to true is Sum is to be returned.
/// </summary>
/// <value></value>
[Parameter(ParameterSetName = GenericParameterSet)]
@ -331,7 +315,7 @@ namespace Microsoft.PowerShell.Commands
private bool _allStats;
/// <summary>
/// Set to true is Average is to be returned
/// Set to true is Average is to be returned.
/// </summary>
/// <value></value>
[Parameter(ParameterSetName = GenericParameterSet)]
@ -349,7 +333,7 @@ namespace Microsoft.PowerShell.Commands
private bool _measureAverage;
/// <summary>
/// Set to true is Max is to be returned
/// Set to true is Max is to be returned.
/// </summary>
/// <value></value>
[Parameter(ParameterSetName = GenericParameterSet)]
@ -367,7 +351,7 @@ namespace Microsoft.PowerShell.Commands
private bool _measureMax;
/// <summary>
/// Set to true is Min is to be returned
/// Set to true is Min is to be returned.
/// </summary>
/// <value></value>
[Parameter(ParameterSetName = GenericParameterSet)]
@ -658,12 +642,12 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Class contains util static functions
/// Class contains util static functions.
/// </summary>
private static class TextCountUtilities
{
/// <summary>
/// count chars in inStr
/// Count chars in inStr.
/// </summary>
/// <param name="inStr">string whose chars are counted</param>
/// <param name="ignoreWhiteSpace">true to discount white space</param>
@ -690,7 +674,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// count words in inStr
/// Count words in inStr.
/// </summary>
/// <param name="inStr">string whose words are counted</param>
/// <returns>number of words in inStr</returns>
@ -721,7 +705,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// count lines in inStr
/// Count lines in inStr.
/// </summary>
/// <param name="inStr">string whose lines are counted</param>
/// <returns>number of lines in inStr</returns>
@ -787,7 +771,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// WriteError when a property is not found
/// WriteError when a property is not found.
/// </summary>
/// <param name="propertyName">The missing property.</param>
/// <param name="errorId">The error ID to write.</param>
@ -961,9 +945,8 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// The observed statistics keyed by property name. If
/// Property is not set, then the key used will be the
/// value of thisObject.
/// The observed statistics keyed by property name.
/// If Property is not set, then the key used will be the value of thisObject.
/// </summary>
private MeasureObjectDictionary<Statistics> _statistics = new MeasureObjectDictionary<Statistics>();
@ -994,4 +977,3 @@ namespace Microsoft.PowerShell.Commands
private const string thisObject = "$_";
}
}

View file

@ -8,9 +8,8 @@ using System.Management.Automation.Internal;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// The implementation of the "new-alias" cmdlet
/// The implementation of the "new-alias" cmdlet.
/// </summary>
///
[Cmdlet(VerbsCommon.New, "Alias", SupportsShouldProcess = true, HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113352")]
[OutputType(typeof(AliasInfo))]
public class NewAliasCommand : WriteAliasCommandBase
@ -20,7 +19,6 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// The main processing loop of the command.
/// </summary>
///
protected override void ProcessRecord()
{
// If not force, then see if the alias already exists

View file

@ -7,14 +7,14 @@ using System.Management.Automation;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// The implementation of the "new-guid" cmdlet
/// The implementation of the "new-guid" cmdlet.
/// </summary>
[Cmdlet(VerbsCommon.New, "Guid", HelpUri = "https://go.microsoft.com/fwlink/?LinkId=526920")]
[OutputType(typeof(Guid))]
public class NewGuidCommand : Cmdlet
{
/// <summary>
/// returns a guid
/// Returns a guid.
/// </summary>
protected override void EndProcessing()
{

View file

@ -8,14 +8,14 @@ using System.Management.Automation;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// The implementation of the "New-TemporaryFile" cmdlet
/// The implementation of the "New-TemporaryFile" cmdlet.
/// </summary>
[Cmdlet(VerbsCommon.New, "TemporaryFile", SupportsShouldProcess = true, HelpUri = "https://go.microsoft.com/fwlink/?LinkId=821836")]
[OutputType(typeof(System.IO.FileInfo))]
public class NewTemporaryFileCommand : Cmdlet
{
/// <summary>
/// returns a TemporaryFile
/// Returns a TemporaryFile.
/// </summary>
protected override void EndProcessing()
{

View file

@ -8,7 +8,7 @@ using Dbg = System.Management.Automation;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// implementation for the new-timespan command
/// Implementation for the new-timespan command.
/// </summary>
[Cmdlet(VerbsCommon.New, "TimeSpan", DefaultParameterSetName = "Date",
HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113360", RemotingCapability = RemotingCapability.None)]
@ -19,7 +19,7 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// This parameter indicates the date the time span begins;
/// it is used if two times are being compared
/// it is used if two times are being compared.
/// </summary>
[Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "Date")]
[Alias("LastWriteTime")]
@ -60,25 +60,25 @@ namespace Microsoft.PowerShell.Commands
private bool _endSpecified = false;
/// <summary>
/// Allows the user to override the day
/// Allows the user to override the day.
/// </summary>
[Parameter(ParameterSetName = "Time")]
public int Days { get; set; } = 0;
/// <summary>
/// Allows the user to override the hour
/// Allows the user to override the hour.
/// </summary>
[Parameter(ParameterSetName = "Time")]
public int Hours { get; set; } = 0;
/// <summary>
/// Allows the user to override the minute
/// Allows the user to override the minute.
/// </summary>
[Parameter(ParameterSetName = "Time")]
public int Minutes { get; set; } = 0;
/// <summary>
/// Allows the user to override the second
/// Allows the user to override the second.
/// </summary>
[Parameter(ParameterSetName = "Time")]
public int Seconds { get; set; } = 0;
@ -88,7 +88,7 @@ namespace Microsoft.PowerShell.Commands
#region methods
/// <summary>
/// Calculate and write out the appropriate timespan
/// Calculate and write out the appropriate timespan.
/// </summary>
protected override void ProcessRecord()
{
@ -123,7 +123,6 @@ namespace Microsoft.PowerShell.Commands
WriteObject(result);
}
#endregion
}
}

View file

@ -16,8 +16,8 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// Keeps the property value of inputObject. Because the value of a non-existing property is null,
/// isExistingProperty is needed to distinguish whether a property exists and its value is null or
/// the property does not exist at all.
/// isExistingProperty is needed to distinguish whether a property exists and its value is null or
/// the property does not exist at all.
/// </summary>
internal class ObjectCommandPropertyValue
{
@ -130,7 +130,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
///
/// ObjectCommandComparer class.
/// </summary>
internal class ObjectCommandComparer : IComparer
{
@ -175,17 +175,16 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Main method that will compare first and second by
/// their keys considering case and order
/// Main method that will compare first and second by their keys considering case and order.
/// </summary>
/// <param name="first">
/// first object to extract value
/// First object to extract value.
/// </param>
/// <param name="second">
/// second object to extract value
/// Second object to extract value.
/// </param>
/// <returns>
/// 0 if they are the same, less than 0 if first is smaller, more than 0 if first is greater
/// 0 if they are the same, less than 0 if first is smaller, more than 0 if first is greater.
///</returns>
public int Compare(object first, object second)
{
@ -232,7 +231,5 @@ namespace Microsoft.PowerShell.Commands
private bool _caseSensitive = false;
}
#endregion
}

View file

@ -13,7 +13,7 @@ using System.Diagnostics.CodeAnalysis;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// definitions for hash table keys
/// Definitions for hash table keys.
/// </summary>
internal static class SortObjectParameterDefinitionKeys
{
@ -44,7 +44,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Base Cmdlet for cmdlets which deal with raw objects
/// Base Cmdlet for cmdlets which deal with raw objects.
/// </summary>
public class ObjectCmdletBase : PSCmdlet
{
@ -146,7 +146,7 @@ namespace Microsoft.PowerShell.Commands
internal List<PSObject> InputObjects { get; } = new List<PSObject>();
/// <summary>
/// CultureInfo converted from the Culture Cmdlet parameter
/// CultureInfo converted from the Culture Cmdlet parameter.
/// </summary>
internal CultureInfo ConvertedCulture
{
@ -159,9 +159,7 @@ namespace Microsoft.PowerShell.Commands
#endregion Internal Properties
/// <summary>
///
/// Simply accumulates the incoming objects
///
/// Simply accumulates the incoming objects.
/// </summary>
protected override void ProcessRecord()
{
@ -177,7 +175,7 @@ namespace Microsoft.PowerShell.Commands
#region Internal properties
/// <summary>
/// a logical matrix where each row is an input object and its property values specified by Properties
/// A logical matrix where each row is an input object and its property values specified by Properties.
/// </summary>
internal List<OrderByPropertyEntry> OrderMatrix { get; } = null;
@ -606,7 +604,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// This is the row of the OrderMatrix
/// This is the row of the OrderMatrix.
/// </summary>
internal sealed class OrderByPropertyEntry
{
@ -715,4 +713,3 @@ namespace Microsoft.PowerShell.Commands
OrderByPropertyComparer _orderByPropertyComparer = null;
}
}

View file

@ -86,10 +86,7 @@ namespace Microsoft.PowerShell.Commands
#region Cmdlet Overrides
/// <summary>
///
/// Write the prompt, then collect a line of input from the host, then
/// output it to the output stream.
///
/// Write the prompt, then collect a line of input from the host, then output it to the output stream.
/// </summary>
protected override void BeginProcessing()
{
@ -172,5 +169,4 @@ namespace Microsoft.PowerShell.Commands
private object _prompt = null;
private Boolean _safe = false;
}
} // namespace Microsoft.PowerShell.Commands
}

View file

@ -16,7 +16,7 @@ namespace Microsoft.PowerShell.Commands
#region parameters
/// <summary>
/// The object on which to subscribe
/// The object on which to subscribe.
/// </summary>
[Parameter(Mandatory = true, Position = 0)]
public PSObject InputObject
@ -33,7 +33,7 @@ namespace Microsoft.PowerShell.Commands
private PSObject _inputObject = null;
/// <summary>
/// The event name to subscribe
/// The event name to subscribe.
/// </summary>
[Parameter(Mandatory = true, Position = 1)]
public string EventName
@ -52,7 +52,7 @@ namespace Microsoft.PowerShell.Commands
#endregion parameters
/// <summary>
/// Returns the object that generates events to be monitored
/// Returns the object that generates events to be monitored.
/// </summary>
protected override Object GetSourceObject()
{
@ -60,11 +60,11 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Returns the event name to be monitored on the input object
/// Returns the event name to be monitored on the input object.
/// </summary>
protected override String GetSourceObjectEventName()
{
return _eventName;
}
}
}
}

View file

@ -14,7 +14,7 @@ namespace Microsoft.PowerShell.Commands
public class RegisterEngineEventCommand : ObjectEventRegistrationBase
{
/// <summary>
/// Parameter for an identifier for this event subscription
/// Parameter for an identifier for this event subscription.
/// </summary>
[Parameter(Mandatory = true, Position = 100)]
public new string SourceIdentifier
@ -30,7 +30,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Returns the object that generates events to be monitored
/// Returns the object that generates events to be monitored.
/// </summary>
protected override Object GetSourceObject()
{
@ -54,11 +54,11 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Returns the event name to be monitored on the input object
/// Returns the event name to be monitored on the input object.
/// </summary>
protected override String GetSourceObjectEventName()
{
return null;
}
}
}
}

View file

@ -6,18 +6,18 @@ using System.Management.Automation;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// This class implements Remove-PSBreakpoint
/// This class implements Remove-PSBreakpoint.
/// </summary>
[Cmdlet(VerbsCommon.Remove, "PSBreakpoint", SupportsShouldProcess = true, DefaultParameterSetName = "Breakpoint",
HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113375")]
public class RemovePSBreakpointCommand : PSBreakpointCommandBase
{
/// <summary>
/// Removes the given breakpoint
/// Removes the given breakpoint.
/// </summary>
protected override void ProcessBreakpoint(Breakpoint breakpoint)
{
this.Context.Debugger.RemoveBreakpoint(breakpoint);
}
}
}
}

View file

@ -24,8 +24,7 @@ namespace Microsoft.PowerShell.Commands
public string[] Name { get; set; }
/// <summary>
/// The scope parameter for the command determines
/// which scope the alias is removed from.
/// The scope parameter for the command determines which scope the alias is removed from.
/// </summary>
[Parameter]
public string Scope { get; set; }

View file

@ -15,7 +15,7 @@ namespace Microsoft.PowerShell.Commands
#region parameters
/// <summary>
/// A source identifier for this event subscription
/// A source identifier for this event subscription.
/// </summary>
[Parameter(Mandatory = true, Position = 0, ParameterSetName = "BySource")]
public string SourceIdentifier
@ -37,7 +37,7 @@ namespace Microsoft.PowerShell.Commands
private string _sourceIdentifier = null;
/// <summary>
/// An identifier for this event subscription
/// An identifier for this event subscription.
/// </summary>
[Parameter(Mandatory = true, Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = "ByIdentifier")]
public int EventIdentifier
@ -58,7 +58,7 @@ namespace Microsoft.PowerShell.Commands
private WildcardPattern _matchPattern;
/// <summary>
/// Remove the event from the queue
/// Remove the event from the queue.
/// </summary>
protected override void ProcessRecord()
{
@ -133,4 +133,4 @@ namespace Microsoft.PowerShell.Commands
}
}
}
}
}

View file

@ -12,7 +12,7 @@ namespace Microsoft.PowerShell.Commands
{
#region SendMailMessage
/// <summary>
/// implementation for the Send-MailMessage command
/// Implementation for the Send-MailMessage command.
/// </summary>
[Cmdlet(VerbsCommunications.Send, "MailMessage", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=135256")]
public sealed class SendMailMessage : PSCmdlet
@ -56,7 +56,7 @@ namespace Microsoft.PowerShell.Commands
private String[] _bcc;
/// <summary>
/// Specifies the body (content) of the message
/// Specifies the body (content) of the message.
/// </summary>
[Parameter(Position = 2, ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
@ -87,7 +87,7 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// Specifies the encoding used for the content of the body and also the subject.
/// This is set to ASCII to ensure there are no problems with any email server
/// This is set to ASCII to ensure there are no problems with any email server.
/// </summary>
[Parameter(ValueFromPipelineByPropertyName = true)]
[Alias("BE")]
@ -126,7 +126,7 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// Specifies the delivery notifications options for the e-mail message. The various
/// option available for this parameter are None, OnSuccess, OnFailure, Delay and Never
/// options available for this parameter are None, OnSuccess, OnFailure, Delay and Never.
/// </summary>
[Parameter(ValueFromPipelineByPropertyName = true)]
[Alias("DNO")]
@ -143,7 +143,7 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// Specifies the from address for this e-mail message. The default value for
/// this parameter is the email address of the currently logged on user
/// this parameter is the email address of the currently logged on user.
/// </summary>
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
@ -159,7 +159,7 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// Specifies the name of the Host used to send the email. This host name will be assigned
/// to the Powershell variable PSEmailServer,if this host can not reached an appropriate error
/// to the Powershell variable PSEmailServer, if this host can not reached an appropriate error.
/// message will be displayed.
/// </summary>
[Parameter(Position = 3, ValueFromPipelineByPropertyName = true)]
@ -176,7 +176,7 @@ namespace Microsoft.PowerShell.Commands
private String _smtpserver;
/// <summary>
/// Specifies the priority of the email message. The valid values for this are Normal, High and Low
/// Specifies the priority of the email message. The valid values for this are Normal, High and Low.
/// </summary>
[Parameter(ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
@ -239,7 +239,7 @@ namespace Microsoft.PowerShell.Commands
private PSCredential _credential;
/// <summary>
/// Specifies if Secured layer is required or not
/// Specifies if Secured layer is required or not.
/// </summary>
[Parameter(ValueFromPipelineByPropertyName = true)]
public SwitchParameter UseSsl
@ -277,8 +277,8 @@ namespace Microsoft.PowerShell.Commands
private SmtpClient _mSmtpClient = null;
/// <summary>
/// Add the input addresses which are either string or hashtable to the MailMessage
/// It returns true if the from parameter has more than one value
/// Add the input addresses which are either string or hashtable to the MailMessage.
/// It returns true if the from parameter has more than one value.
/// </summary>
/// <param name="address"></param>
/// <param name="param"></param>
@ -323,7 +323,7 @@ namespace Microsoft.PowerShell.Commands
#region Overrides
/// <summary>
/// ProcessRecord override
/// ProcessRecord override.
/// </summary>
protected override
void
@ -415,7 +415,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// ProcessRecord override
/// ProcessRecord override.
/// </summary>
protected override void ProcessRecord()
{
@ -441,7 +441,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// EndProcessing
/// EndProcessing.
/// </summary>
protected override void EndProcessing()
{
@ -485,6 +485,5 @@ namespace Microsoft.PowerShell.Commands
#endregion
}
#endregion
}

View file

@ -20,7 +20,7 @@ namespace Microsoft.PowerShell.Commands
#region parameters
/// <summary>
/// the action to take when hitting this breakpoint
/// The action to take when hitting this breakpoint.
/// </summary>
[Parameter(ParameterSetName = "Command")]
[Parameter(ParameterSetName = "Line")]
@ -28,7 +28,7 @@ namespace Microsoft.PowerShell.Commands
public ScriptBlock Action { get; set; } = null;
/// <summary>
/// The column to set the breakpoint on
/// The column to set the breakpoint on.
/// </summary>
[Parameter(Position = 2, ParameterSetName = "Line")]
[ValidateRange(1, int.MaxValue)]
@ -46,7 +46,7 @@ namespace Microsoft.PowerShell.Commands
private int? _column = null;
/// <summary>
/// the command(s) to set the breakpoint on
/// The command(s) to set the breakpoint on.
/// </summary>
[Alias("C")]
[Parameter(ParameterSetName = "Command", Mandatory = true)]
@ -54,14 +54,14 @@ namespace Microsoft.PowerShell.Commands
public string[] Command { get; set; } = null;
/// <summary>
/// the line to set the breakpoint on
/// The line to set the breakpoint on.
/// </summary>
[Parameter(Position = 1, ParameterSetName = "Line", Mandatory = true)]
[ValidateNotNull]
public int[] Line { get; set; } = null;
/// <summary>
/// the script to set the breakpoint on
/// The script to set the breakpoint on.
/// </summary>
[Parameter(ParameterSetName = "Command", Position = 0)]
[Parameter(ParameterSetName = "Line", Mandatory = true, Position = 0)]
@ -70,7 +70,7 @@ namespace Microsoft.PowerShell.Commands
public string[] Script { get; set; } = null;
/// <summary>
/// the variables to set the breakpoint(s) on
/// The variables to set the breakpoint(s) on.
/// </summary>
[Alias("V")]
[Parameter(ParameterSetName = "Variable", Mandatory = true)]
@ -86,14 +86,12 @@ namespace Microsoft.PowerShell.Commands
#endregion parameters
/// <summary>
/// verifies that debugging is supported
/// Verifies that debugging is supported.
/// </summary>
protected override void BeginProcessing()
{
//
// Check whether we are executing on a remote session and if so
// whether the RemoteScript debug option is selected.
//
if (this.Context.InternalHost.ExternalHost is System.Management.Automation.Remoting.ServerRemoteHost &&
((this.Context.CurrentRunspace == null) || (this.Context.CurrentRunspace.Debugger == null) ||
((this.Context.CurrentRunspace.Debugger.DebugMode & DebugModes.RemoteScript) != DebugModes.RemoteScript) &&
@ -126,13 +124,11 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// set a new breakpoint
/// Set a new breakpoint.
/// </summary>
protected override void ProcessRecord()
{
//
// If there is a script, resolve its path
//
Collection<string> scripts = new Collection<string>();
if (Script != null)
@ -257,4 +253,4 @@ namespace Microsoft.PowerShell.Commands
}
}
}
}
}

View file

@ -10,7 +10,6 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// The implementation of the "set-alias" cmdlet
/// </summary>
///
[Cmdlet(VerbsCommon.Set, "Alias", SupportsShouldProcess = true, HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113390")]
[OutputType(typeof(AliasInfo))]
public class SetAliasCommand : WriteAliasCommandBase

View file

@ -13,7 +13,7 @@ using Dbg = System.Management.Automation;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// implementation for the set-date command
/// Implementation for the set-date command.
/// </summary>
[Cmdlet(VerbsCommon.Set, "Date", DefaultParameterSetName = "Date", SupportsShouldProcess = true, HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113393")]
[OutputType(typeof(DateTime))]
@ -22,20 +22,20 @@ namespace Microsoft.PowerShell.Commands
#region parameters
/// <summary>
/// Allows user to override the date/time object that will be processed
/// Allows user to override the date/time object that will be processed.
/// </summary>
[Parameter(Position = 0, Mandatory = true, ParameterSetName = "Date", ValueFromPipeline = true, ValueFromPipelineByPropertyName = true)]
public DateTime Date { get; set; }
/// <summary>
/// Allows a use to specify a timespan with which to apply to the current time
/// Allows a use to specify a timespan with which to apply to the current time.
/// </summary>
[Parameter(Position = 0, Mandatory = true, ParameterSetName = "Adjust", ValueFromPipelineByPropertyName = true)]
[AllowNull]
public TimeSpan Adjust { get; set; }
/// <summary>
/// This option determines the default output format used to display the object set-date emits
/// This option determines the default output format used to display the object set-date emits.
/// </summary>
[Parameter]
public DisplayHintType DisplayHint { get; set; } = DisplayHintType.DateTime;
@ -45,7 +45,7 @@ namespace Microsoft.PowerShell.Commands
#region methods
/// <summary>
/// set the date
/// Set the date.
/// </summary>
[ArchitectureSensitive]
protected override void ProcessRecord()
@ -130,7 +130,6 @@ namespace Microsoft.PowerShell.Commands
[DllImport(PinvokeDllNames.SetLocalTimeDllName, SetLastError = true)]
public static extern bool SetLocalTime(ref SystemTime systime);
}
#endregion
}
}

View file

@ -22,7 +22,7 @@ namespace Microsoft.PowerShell.Commands
{
#region Private Fields
/// <summary>
/// Set to true when ProcessRecord is reached, since it will always open a window
/// Set to true when ProcessRecord is reached, since it will always open a window.
/// </summary>
private bool _hasOpenedWindow;
@ -42,7 +42,7 @@ namespace Microsoft.PowerShell.Commands
private List<ShowCommandCommandInfo> _commands;
/// <summary>
/// List of modules that have been loaded indexed by module name
/// List of modules that have been loaded indexed by module name.
/// </summary>
private Dictionary<string, ShowCommandModuleInfo> _importedModules;
@ -57,13 +57,13 @@ namespace Microsoft.PowerShell.Commands
private SwitchParameter _noCommonParameter;
/// <summary>
/// Object used for ShowCommand with a command name that holds the view model created for the command
/// Object used for ShowCommand with a command name that holds the view model created for the command.
/// </summary>
private object _commandViewModelObj;
#endregion
/// <summary>
/// Finalizes an instance of the ShowCommandCommand class
/// Finalizes an instance of the ShowCommandCommand class.
/// </summary>
~ShowCommandCommand()
{
@ -93,7 +93,7 @@ namespace Microsoft.PowerShell.Commands
public double Width { get; set; }
/// <summary>
/// Gets or sets a value indicating Common Parameters should not be displayed
/// Gets or sets a value indicating Common Parameters should not be displayed.
/// </summary>
[Parameter]
public SwitchParameter NoCommonParameter
@ -103,13 +103,13 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Gets or sets a value indicating errors should not cause a message window to be displayed
/// Gets or sets a value indicating errors should not cause a message window to be displayed.
/// </summary>
[Parameter]
public SwitchParameter ErrorPopup { get; set; }
/// <summary>
/// Gets or sets a value indicating the command should be sent to the pipeline as a string instead of run
/// Gets or sets a value indicating the command should be sent to the pipeline as a string instead of run.
/// </summary>
[Parameter]
public SwitchParameter PassThru
@ -161,7 +161,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Dispose method in IDisposable
/// Dispose method in IDisposable.
/// </summary>
public void Dispose()
{
@ -213,7 +213,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Optionally displays errors in a message
/// Optionally displays errors in a message.
/// </summary>
protected override void EndProcessing()
{
@ -286,7 +286,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Issues an error when this.commandName was not found
/// Issues an error when this.commandName was not found.
/// </summary>
private void IssueErrorForNoCommand()
{
@ -299,7 +299,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Issues an error when there is more than one command matching this.commandName
/// Issues an error when there is more than one command matching this.commandName.
/// </summary>
private void IssueErrorForMoreThanOneCommand()
{
@ -313,7 +313,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Called from CommandProcessRecord to run the command that will get the CommandInfo and list of modules
/// Called from CommandProcessRecord to run the command that will get the CommandInfo and list of modules.
/// </summary>
/// <param name="command">command to be retrieved</param>
/// <param name="modules">list of loaded modules</param>
@ -410,7 +410,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Waits untill the window has been closed answering HelpNeeded events
/// Waits until the window has been closed answering HelpNeeded events.
/// </summary>
private void WaitForWindowClosedOrHelpNeeded()
{
@ -452,7 +452,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Writes the output of a script being run into the pipeline
/// Writes the output of a script being run into the pipeline.
/// </summary>
/// <param name="sender">output collection</param>
/// <param name="e">output event</param>
@ -462,7 +462,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Writes the errors of a script being run into the pipeline
/// Writes the errors of a script being run into the pipeline.
/// </summary>
/// <param name="sender">error collection</param>
/// <param name="e">error event</param>
@ -472,7 +472,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Implements IDisposable logic
/// Implements IDisposable logic.
/// </summary>
/// <param name="isDisposing">true if being called from Dispose</param>
private void Dispose(bool isDisposing)
@ -489,17 +489,17 @@ namespace Microsoft.PowerShell.Commands
#endregion
/// <summary>
/// Wraps interop code for console input buffer
/// Wraps interop code for console input buffer.
/// </summary>
internal static class ConsoleInputWithNativeMethods
{
/// <summary>
/// Constant used in calls to GetStdHandle
/// Constant used in calls to GetStdHandle.
/// </summary>
internal const int STD_INPUT_HANDLE = -10;
/// <summary>
/// Adds a string to the console input buffer
/// Adds a string to the console input buffer.
/// </summary>
/// <param name="str">string to add to console input buffer</param>
/// <param name="newLine">true to add Enter after the string</param>
@ -551,7 +551,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Gets the console handle
/// Gets the console handle.
/// </summary>
/// <param name="nStdHandle">which console handle to get</param>
/// <returns>the console handle</returns>
@ -559,7 +559,7 @@ namespace Microsoft.PowerShell.Commands
internal static extern IntPtr GetStdHandle(int nStdHandle);
/// <summary>
/// Writes to the console input buffer
/// Writes to the console input buffer.
/// </summary>
/// <param name="hConsoleInput">console handle</param>
/// <param name="lpBuffer">inputs to be written</param>
@ -575,23 +575,23 @@ namespace Microsoft.PowerShell.Commands
out uint lpNumberOfEventsWritten);
/// <summary>
/// A record to be added to the console buffer
/// A record to be added to the console buffer.
/// </summary>
internal struct INPUT_RECORD
{
/// <summary>
/// The proper event type for a KeyEvent KEY_EVENT_RECORD
/// The proper event type for a KeyEvent KEY_EVENT_RECORD.
/// </summary>
internal const int KEY_EVENT = 0x0001;
/// <summary>
/// input buffer event type
/// input buffer event type.
/// </summary>
internal ushort EventType;
/// <summary>
/// The actual event. The original structure is a union of many others, but this is the largest of them
/// And we don't need other kinds of events
/// The actual event. The original structure is a union of many others, but this is the largest of them.
/// And we don't need other kinds of events.
/// </summary>
internal KEY_EVENT_RECORD KeyEvent;
@ -609,38 +609,38 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Type of INPUT_RECORD which is a key
/// Type of INPUT_RECORD which is a key.
/// </summary>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
internal struct KEY_EVENT_RECORD
{
/// <summary>
/// true for key down and false for key up, but only needed if wVirtualKeyCode is used
/// True for key down and false for key up, but only needed if wVirtualKeyCode is used.
/// </summary>
internal bool bKeyDown;
/// <summary>
/// repeat count
/// Repeat count.
/// </summary>
internal ushort wRepeatCount;
/// <summary>
/// virtual key code
/// Virtual key code.
/// </summary>
internal ushort wVirtualKeyCode;
/// <summary>
/// virtual key scan code
/// Virtual key scan code.
/// </summary>
internal ushort wVirtualScanCode;
/// <summary>
/// character in input. If this is specified, wVirtualKeyCode, and others don't need to be
/// Character in input. If this is specified, wVirtualKeyCode, and others don't need to be.
/// </summary>
internal char UnicodeChar;
/// <summary>
/// State of keys like Shift and control
/// State of keys like Shift and control.
/// </summary>
internal uint dwControlKeyState;
}

View file

@ -9,14 +9,13 @@ namespace Microsoft.PowerShell.Commands.ShowCommandExtension
using System.Management.Automation;
/// <summary>
/// Implements a facade around CommandInfo and its deserialized counterpart
/// Implements a facade around CommandInfo and its deserialized counterpart.
/// </summary>
public class ShowCommandCommandInfo
{
/// <summary>
/// Creates an instance of the ShowCommandCommandInfo class based on a CommandInfo object
/// Creates an instance of the ShowCommandCommandInfo class based on a CommandInfo object.
/// </summary>
///
/// <param name="other">
/// The object to wrap.
/// </param>
@ -63,9 +62,8 @@ namespace Microsoft.PowerShell.Commands.ShowCommandExtension
}
/// <summary>
/// Creates an instance of the ShowCommandCommandInfo class based on a PSObject object
/// Creates an instance of the ShowCommandCommandInfo class based on a PSObject object.
/// </summary>
///
/// <param name="other">
/// The object to wrap.
/// </param>
@ -102,9 +100,8 @@ namespace Microsoft.PowerShell.Commands.ShowCommandExtension
}
/// <summary>
/// Builds a strongly typed IEnumerable{object} out of an IEnumerable
/// Builds a strongly typed IEnumerable{object} out of an IEnumerable.
/// </summary>
///
/// <param name="enumerable">
/// The object to enumerate.
/// </param>

View file

@ -7,14 +7,13 @@ namespace Microsoft.PowerShell.Commands.ShowCommandExtension
using System.Management.Automation;
/// <summary>
/// Implements a facade around PSModuleInfo and its deserialized counterpart
/// Implements a facade around PSModuleInfo and its deserialized counterpart.
/// </summary>
public class ShowCommandModuleInfo
{
/// <summary>
/// Creates an instance of the ShowCommandModuleInfo class based on a CommandInfo object
/// Creates an instance of the ShowCommandModuleInfo class based on a CommandInfo object.
/// </summary>
///
/// <param name="other">
/// The object to wrap.
/// </param>
@ -29,9 +28,8 @@ namespace Microsoft.PowerShell.Commands.ShowCommandExtension
}
/// <summary>
/// Creates an instance of the ShowCommandModuleInfo class based on a PSObject object
/// Creates an instance of the ShowCommandModuleInfo class based on a PSObject object.
/// </summary>
///
/// <param name="other">
/// The object to wrap.
/// </param>
@ -46,7 +44,7 @@ namespace Microsoft.PowerShell.Commands.ShowCommandExtension
}
/// <summary>
/// Gets the name of this module
/// Gets the name of this module.
/// </summary>
public string Name { get; private set; }
}

View file

@ -9,14 +9,13 @@ namespace Microsoft.PowerShell.Commands.ShowCommandExtension
using System.Management.Automation;
/// <summary>
/// Implements a facade around ShowCommandParameterInfo and its deserialized counterpart
/// Implements a facade around ShowCommandParameterInfo and its deserialized counterpart.
/// </summary>
public class ShowCommandParameterInfo
{
/// <summary>
/// Creates an instance of the ShowCommandParameterInfo class based on a CommandParameterInfo object
/// Creates an instance of the ShowCommandParameterInfo class based on a CommandParameterInfo object.
/// </summary>
///
/// <param name="other">
/// The object to wrap.
/// </param>
@ -42,9 +41,8 @@ namespace Microsoft.PowerShell.Commands.ShowCommandExtension
}
/// <summary>
/// Creates an instance of the ShowCommandParameterInfo class based on a PSObject object
/// Creates an instance of the ShowCommandParameterInfo class based on a PSObject object.
/// </summary>
///
/// <param name="other">
/// The object to wrap.
/// </param>
@ -88,7 +86,7 @@ namespace Microsoft.PowerShell.Commands.ShowCommandExtension
public ShowCommandParameterType ParameterType { get; private set; }
/// <summary>
/// The possible values of this parameter
/// The possible values of this parameter.
/// </summary>
public IList<string> ValidParamSetValues { get; private set; }

View file

@ -9,14 +9,13 @@ namespace Microsoft.PowerShell.Commands.ShowCommandExtension
using System.Management.Automation;
/// <summary>
/// Implements a facade around CommandParameterSetInfo and its deserialized counterpart
/// Implements a facade around CommandParameterSetInfo and its deserialized counterpart.
/// </summary>
public class ShowCommandParameterSetInfo
{
/// <summary>
/// Creates an instance of the ShowCommandParameterSetInfo class based on a CommandParameterSetInfo object
/// Creates an instance of the ShowCommandParameterSetInfo class based on a CommandParameterSetInfo object.
/// </summary>
///
/// <param name="other">
/// The object to wrap.
/// </param>
@ -33,9 +32,8 @@ namespace Microsoft.PowerShell.Commands.ShowCommandExtension
}
/// <summary>
/// Creates an instance of the ShowCommandParameterSetInfo class based on a PSObject object
/// Creates an instance of the ShowCommandParameterSetInfo class based on a PSObject object.
/// </summary>
///
/// <param name="other">
/// The object to wrap.
/// </param>
@ -53,7 +51,7 @@ namespace Microsoft.PowerShell.Commands.ShowCommandExtension
}
/// <summary>
/// Gets the name of the parameter set
/// Gets the name of the parameter set.
/// </summary>
public string Name { get; private set; }

View file

@ -8,12 +8,12 @@ namespace Microsoft.PowerShell.Commands.ShowCommandExtension
using System.Management.Automation;
/// <summary>
/// Implements a facade around ShowCommandParameterInfo and its deserialized counterpart
/// Implements a facade around ShowCommandParameterInfo and its deserialized counterpart.
/// </summary>
public class ShowCommandParameterType
{
/// <summary>
/// Creates an instance of the ShowCommandParameterType class based on a Type object
/// Creates an instance of the ShowCommandParameterType class based on a Type object.
/// </summary>
///
/// <param name="other">
@ -43,7 +43,7 @@ namespace Microsoft.PowerShell.Commands.ShowCommandExtension
}
/// <summary>
/// Creates an instance of the ShowCommandParameterType class based on a Type object
/// Creates an instance of the ShowCommandParameterType class based on a Type object.
/// </summary>
///
/// <param name="other">
@ -74,37 +74,37 @@ namespace Microsoft.PowerShell.Commands.ShowCommandExtension
}
/// <summary>
/// The full name of the outermost type
/// The full name of the outermost type.
/// </summary>
public string FullName { get; private set; }
/// <summary>
/// Whether or not this type is an enum
/// Whether or not this type is an enum.
/// </summary>
public bool IsEnum { get; private set; }
/// <summary>
/// Whether or not this type is an dictionary
/// Whether or not this type is an dictionary.
/// </summary>
public bool ImplementsDictionary { get; private set; }
/// <summary>
/// Whether or not this enum has a flag attribute
/// Whether or not this enum has a flag attribute.
/// </summary>
public bool HasFlagAttribute { get; private set; }
/// <summary>
/// Whether or not this type is an array type
/// Whether or not this type is an array type.
/// </summary>
public bool IsArray { get; private set; }
/// <summary>
/// Gets the inner type, if this corresponds to an array type
/// Gets the inner type, if this corresponds to an array type.
/// </summary>
public ShowCommandParameterType ElementType { get; private set; }
/// <summary>
/// Whether or not this type is a string
/// Whether or not this type is a string.
/// </summary>
public bool IsString
{
@ -115,7 +115,7 @@ namespace Microsoft.PowerShell.Commands.ShowCommandExtension
}
/// <summary>
/// Whether or not this type is an script block
/// Whether or not this type is an script block.
/// </summary>
public bool IsScriptBlock
{
@ -126,7 +126,7 @@ namespace Microsoft.PowerShell.Commands.ShowCommandExtension
}
/// <summary>
/// Whether or not this type is a bool
/// Whether or not this type is a bool.
/// </summary>
public bool IsBoolean
{
@ -137,7 +137,7 @@ namespace Microsoft.PowerShell.Commands.ShowCommandExtension
}
/// <summary>
/// Whether or not this type is a switch parameter
/// Whether or not this type is a switch parameter.
/// </summary>
public bool IsSwitch
{
@ -148,7 +148,7 @@ namespace Microsoft.PowerShell.Commands.ShowCommandExtension
}
/// <summary>
/// If this is an enum value, return the list of potential values
/// If this is an enum value, return the list of potential values.
/// </summary>
public ArrayList EnumValues { get; private set; }
}

View file

@ -38,7 +38,7 @@ namespace Microsoft.PowerShell.Commands
#region parameters
/// <summary>
/// Allows sleep time to be specified in seconds
/// Allows sleep time to be specified in seconds.
/// </summary>
[Parameter(Position = 0, Mandatory = true, ParameterSetName = "Seconds", ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
@ -46,7 +46,7 @@ namespace Microsoft.PowerShell.Commands
public int Seconds { get; set; }
/// <summary>
/// Allows sleep time to be specified in milliseconds
/// Allows sleep time to be specified in milliseconds.
/// </summary>
[Parameter(Mandatory = true, ParameterSetName = "Milliseconds", ValueFromPipelineByPropertyName = true)]
[ValidateRangeAttribute(0, int.MaxValue)]
@ -68,8 +68,7 @@ namespace Microsoft.PowerShell.Commands
private bool _stopping = false;
/// <summary>
/// This method causes calling thread to sleep for
/// specified milliseconds
/// This method causes calling thread to sleep for specified milliseconds.
/// </summary>
private void Sleep(int milliSecondsToSleep)
{
@ -87,7 +86,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
///
/// ProcessRecord method.
/// </summary>
protected override void ProcessRecord()
{
@ -112,11 +111,9 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// stopprocessing override
/// StopProcessing override.
/// </summary>
protected override
void
StopProcessing()
protected override void StopProcessing()
{
lock (_syncObject)
{

View file

@ -22,13 +22,13 @@ namespace Microsoft.PowerShell.Commands
#region parameters
/// <summary>
/// This parameter specifies the current pipeline object
/// This parameter specifies the current pipeline object.
/// </summary>
[Parameter(ValueFromPipeline = true)]
public PSObject InputObject { set; get; } = AutomationNull.Value;
/// <summary>
/// The script block to apply
/// The script block to apply.
/// </summary>
[Parameter(Position = 0, Mandatory = true)]
public ScriptBlock Expression { set; get; }
@ -44,7 +44,7 @@ namespace Microsoft.PowerShell.Commands
#region methods
/// <summary>
/// Output the timer
/// Output the timer.
/// </summary>
protected override void EndProcessing()
{
@ -52,8 +52,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Execute the script block passing in the current pipeline object as
/// it's only parameter.
/// Execute the script block passing in the current pipeline object as it's only parameter.
/// </summary>
protected override void ProcessRecord()
{

View file

@ -15,7 +15,7 @@ namespace Microsoft.PowerShell.Commands
#region parameters
/// <summary>
/// An identifier for this event subscription
/// An identifier for this event subscription.
/// </summary>
[Parameter(Mandatory = true, Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = "BySource")]
public string SourceIdentifier
@ -37,14 +37,13 @@ namespace Microsoft.PowerShell.Commands
private string _sourceIdentifier = null;
/// <summary>
/// An identifier for this event subscription
/// An identifier for this event subscription.
/// </summary>
[Parameter(Mandatory = true, Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = "ById")]
public int SubscriptionId { get; set; } = -1;
/// <summary>
/// Flag that determines if we should include subscriptions used to support
/// other subscriptions
/// Flag that determines if we should include subscriptions used to support other subscriptions.
/// </summary>
[Parameter()]
public SwitchParameter Force { get; set; }
@ -55,7 +54,7 @@ namespace Microsoft.PowerShell.Commands
private bool _foundMatch = false;
/// <summary>
/// Unsubscribe from the event
/// Unsubscribe from the event.
/// </summary>
protected override void ProcessRecord()
{
@ -123,4 +122,4 @@ namespace Microsoft.PowerShell.Commands
}
}
}
}
}

View file

@ -8,17 +8,17 @@ using System.Collections.ObjectModel;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// This is the base class for update-typedata and update-formatdata
/// This is the base class for update-typedata and update-formatdata.
/// </summary>
public class UpdateData : PSCmdlet
{
/// <summary>
/// File parameter set name
/// File parameter set name.
/// </summary>
protected const string FileParameterSet = "FileSet";
/// <summary>
/// Files to append to the existing set
/// Files to append to the existing set.
/// </summary>
[Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true,
ParameterSetName = FileParameterSet)]
@ -27,7 +27,7 @@ namespace Microsoft.PowerShell.Commands
public string[] AppendPath { set; get; } = Utils.EmptyArray<string>();
/// <summary>
/// Files to prepend to the existing set
/// Files to prepend to the existing set.
/// </summary>
[Parameter(ParameterSetName = FileParameterSet)]
[ValidateNotNull]

View file

@ -35,7 +35,7 @@ namespace Microsoft.PowerShell.Commands
private PSMemberTypes _memberType;
private bool _isMemberTypeSet = false;
/// <summary>
/// The member type of to be added
/// The member type of to be added.
/// </summary>
[Parameter(ParameterSetName = DynamicTypeSet)]
[ValidateNotNullOrEmpty]
@ -57,7 +57,7 @@ namespace Microsoft.PowerShell.Commands
private string _memberName;
/// <summary>
/// The name of the new member
/// The name of the new member.
/// </summary>
[Parameter(ParameterSetName = DynamicTypeSet)]
[ValidateNotNullOrEmpty]
@ -94,7 +94,7 @@ namespace Microsoft.PowerShell.Commands
private Type _typeConverter;
/// <summary>
/// The type converter to be added
/// The type converter to be added.
/// </summary>
[Parameter(ParameterSetName = DynamicTypeSet)]
[ValidateNotNull]
@ -106,7 +106,7 @@ namespace Microsoft.PowerShell.Commands
private Type _typeAdapter;
/// <summary>
/// The type adapter to be added
/// The type adapter to be added.
/// </summary>
[Parameter(ParameterSetName = DynamicTypeSet)]
[ValidateNotNull]
@ -117,7 +117,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// SerializationMethod
/// SerializationMethod.
/// </summary>
[Parameter(ParameterSetName = DynamicTypeSet)]
[ValidateNotNullOrEmpty]
@ -128,7 +128,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// TargetTypeForDeserialization
/// TargetTypeForDeserialization.
/// </summary>
[Parameter(ParameterSetName = DynamicTypeSet)]
[ValidateNotNull]
@ -139,7 +139,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// SerializationDepth
/// SerializationDepth.
/// </summary>
[Parameter(ParameterSetName = DynamicTypeSet)]
[ValidateNotNull]
@ -151,7 +151,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// DefaultDisplayProperty
/// DefaultDisplayProperty.
/// </summary>
[Parameter(ParameterSetName = DynamicTypeSet)]
[ValidateNotNullOrEmpty]
@ -162,7 +162,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// InheritPropertySerializationSet
/// InheritPropertySerializationSet.
/// </summary>
[Parameter(ParameterSetName = DynamicTypeSet)]
[ValidateNotNull]
@ -173,7 +173,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// StringSerializationSource
/// StringSerializationSource.
/// </summary>
[Parameter(ParameterSetName = DynamicTypeSet)]
[ValidateNotNullOrEmpty]
@ -184,7 +184,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// DefaultDisplayPropertySet
/// DefaultDisplayPropertySet.
/// </summary>
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Cmdlets use arrays for parameters.")]
[Parameter(ParameterSetName = DynamicTypeSet)]
@ -196,7 +196,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// DefaultKeyPropertySet
/// DefaultKeyPropertySet.
/// </summary>
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Cmdlets use arrays for parameters.")]
[Parameter(ParameterSetName = DynamicTypeSet)]
@ -208,7 +208,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// PropertySerializationSet
/// PropertySerializationSet.
/// </summary>
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Cmdlets use arrays for parameters.")]
[Parameter(ParameterSetName = DynamicTypeSet)]
@ -236,7 +236,7 @@ namespace Microsoft.PowerShell.Commands
private string _typeName;
/// <summary>
/// The type name we want to update on
/// The type name we want to update on.
/// </summary>
[Parameter(Mandatory = true, ValueFromPipeline = true, ParameterSetName = DynamicTypeSet)]
[ArgumentToTypeNameTransformationAttribute()]
@ -249,7 +249,7 @@ namespace Microsoft.PowerShell.Commands
private bool _force = false;
/// <summary>
/// True if we should overwrite a possibly existing member
/// True if we should overwrite a possibly existing member.
/// </summary>
[Parameter(ParameterSetName = DynamicTypeSet)]
[Parameter(ParameterSetName = TypeDataSet)]
@ -265,7 +265,7 @@ namespace Microsoft.PowerShell.Commands
private TypeData[] _typeData;
/// <summary>
/// The TypeData instances
/// The TypeData instances.
/// </summary>
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Cmdlets use arrays for parameters.")]
[Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = TypeDataSet)]
@ -278,7 +278,7 @@ namespace Microsoft.PowerShell.Commands
#endregion strong type data set
/// <summary>
/// This method verify if the Type Table is shared and cannot be updated
/// This method verify if the Type Table is shared and cannot be updated.
/// </summary>
protected override void BeginProcessing()
{
@ -290,7 +290,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// This method implements the ProcessRecord method for update-typeData command
/// This method implements the ProcessRecord method for update-typeData command.
/// </summary>
protected override void ProcessRecord()
{
@ -309,7 +309,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// This method implements the EndProcessing method for update-typeData command
/// This method implements the EndProcessing method for update-typeData command.
/// </summary>
protected override void EndProcessing()
{
@ -380,7 +380,7 @@ namespace Microsoft.PowerShell.Commands
#region dynamic type processing
/// <summary>
/// Process the dynamic type update
/// Process the dynamic type update.
/// </summary>
private void ProcessDynamicType()
{
@ -489,7 +489,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Get the members for the TypeData
/// Get the members for the TypeData.
/// </summary>
/// <returns></returns>
private void GetMembers(Dictionary<string, TypeMemberData> members)
@ -592,7 +592,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Check if the TypeData instance contains no members
/// Check if the TypeData instance contains no members.
/// </summary>
/// <param name="typeData"></param>
/// <returns>false if empty, true if not</returns>
@ -703,7 +703,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Generate error record
/// Generate error record.
/// </summary>
/// <param name="errorId"></param>
/// <param name="template"></param>
@ -853,7 +853,7 @@ namespace Microsoft.PowerShell.Commands
public class UpdateFormatDataCommand : UpdateData
{
/// <summary>
/// This method verify if the Format database manager is shared and cannot be updated
/// This method verify if the Format database manager is shared and cannot be updated.
/// </summary>
protected override void BeginProcessing()
{
@ -865,7 +865,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// This method implements the ProcessRecord method for update-FormatData command
/// This method implements the ProcessRecord method for update-FormatData command.
/// </summary>
protected override void ProcessRecord()
{
@ -995,7 +995,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Remove-TypeData cmdlet
/// Remove-TypeData cmdlet.
/// </summary>
[Cmdlet(VerbsCommon.Remove, "TypeData", SupportsShouldProcess = true, DefaultParameterSetName = RemoveTypeDataSet,
HelpUri = "https://go.microsoft.com/fwlink/?LinkID=217038")]
@ -1006,8 +1006,9 @@ namespace Microsoft.PowerShell.Commands
private const string RemoveTypeDataSet = "RemoveTypeDataSet";
private string _typeName;
/// <summary>
/// The target type to remove
/// The target type to remove.
/// </summary>
[Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveTypeSet)]
[ArgumentToTypeNameTransformationAttribute()]
@ -1019,8 +1020,9 @@ namespace Microsoft.PowerShell.Commands
}
private string[] _typeFiles;
/// <summary>
/// The type xml file to remove from the cache
/// The type xml file to remove from the cache.
/// </summary>
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Cmdlets use arrays for parameters.")]
[Parameter(Mandatory = true, ParameterSetName = RemoveFileSet)]
@ -1032,8 +1034,9 @@ namespace Microsoft.PowerShell.Commands
}
private TypeData _typeData;
/// <summary>
/// The TypeData to remove
/// The TypeData to remove.
/// </summary>
[Parameter(Mandatory = true, ValueFromPipeline = true, ParameterSetName = RemoveTypeDataSet)]
public TypeData TypeData
@ -1056,7 +1059,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// This method implements the ProcessRecord method for Remove-TypeData command
/// This method implements the ProcessRecord method for Remove-TypeData command.
/// </summary>
protected override void ProcessRecord()
{
@ -1199,7 +1202,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// This method implements the EndProcessing method for Remove-TypeData command
/// This method implements the EndProcessing method for Remove-TypeData command.
/// </summary>
protected override void EndProcessing()
{
@ -1219,7 +1222,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Get-TypeData cmdlet
/// Get-TypeData cmdlet.
/// </summary>
[Cmdlet(VerbsCommon.Get, "TypeData", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=217033")]
[OutputType(typeof(System.Management.Automation.PSObject))]
@ -1228,8 +1231,7 @@ namespace Microsoft.PowerShell.Commands
private WildcardPattern[] _filter;
/// <summary>
/// Get Formatting information only for the specified
/// typename
/// Get Formatting information only for the specified typename.
/// </summary>
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
[ValidateNotNullOrEmpty]
@ -1278,8 +1280,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Takes out the content from the database and writes them
/// out
/// Takes out the content from the database and writes it out.
/// </summary>
protected override void ProcessRecord()
{
@ -1312,7 +1313,7 @@ namespace Microsoft.PowerShell.Commands
/// To make it easier to specify a TypeName, we add an ArgumentTransformationAttribute here.
/// * string: return the string
/// * Type: return the Type.ToString()
/// * instance: return instance.GetType().ToString()
/// * instance: return instance.GetType().ToString() .
/// </summary>
internal sealed class ArgumentToTypeNameTransformationAttribute : ArgumentTransformationAttribute
{
@ -1347,4 +1348,3 @@ namespace Microsoft.PowerShell.Commands
}
}
}

View file

@ -13,7 +13,7 @@ using System.Globalization;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// Don't use! The API is obsolete!
/// Don't use! The API is obsolete!.
/// </summary>
[Obsolete("This class is included in this SDK for completeness only. The members of this class cannot be used directly, nor should this class be used to derive other classes.", true)]
public enum TextEncodingType
@ -60,7 +60,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Utility class to contain resources for the Microsoft.PowerShell.Utility module
/// Utility class to contain resources for the Microsoft.PowerShell.Utility module.
/// </summary>
public static class UtilityResources
{

View file

@ -12,9 +12,7 @@ namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// Base class for all variable commands.
///
/// Because -Scope is defined in VariableCommandBase, all derived commands
/// must implement -Scope.
/// Because -Scope is defined in VariableCommandBase, all derived commands must implement -Scope.
/// </summary>
public abstract class VariableCommandBase : PSCmdlet
@ -31,9 +29,8 @@ namespace Microsoft.PowerShell.Commands
#endregion parameters
/// <summary>
/// The Include parameter for all the variable commands
/// The Include parameter for all the variable commands.
/// </summary>
///
protected string[] IncludeFilters
{
get
@ -53,9 +50,8 @@ namespace Microsoft.PowerShell.Commands
private string[] _include = new string[0];
/// <summary>
/// The Exclude parameter for all the variable commands
/// The Exclude parameter for all the variable commands.
/// </summary>
///
protected string[] ExcludeFilters
{
get
@ -80,30 +76,23 @@ namespace Microsoft.PowerShell.Commands
/// Gets the matching variable for the specified name, using the
/// Include, Exclude, and Scope parameters defined in the base class.
/// </summary>
///
/// <param name="name">
/// The name or pattern of the variables to retrieve.
/// </param>
///
/// <param name="lookupScope">
/// The scope to do the lookup in. If null or empty the normal scoping
/// rules apply.
/// The scope to do the lookup in. If null or empty the normal scoping rules apply.
/// </param>
///
/// <param name="wasFiltered">
/// True is returned if a variable exists of the given name but was filtered
/// out via globbing, include, or exclude.
/// </param>
///
/// <param name="quiet">
/// If true, don't report errors when trying to access private variables.
/// </param>
///
/// <returns>
/// A collection of the variables matching the name, include, and exclude
/// pattern in the specified scope.
/// </returns>
///
internal List<PSVariable> GetMatchingVariables(string name, string lookupScope, out bool wasFiltered, bool quiet)
{
wasFiltered = false;
@ -252,7 +241,7 @@ namespace Microsoft.PowerShell.Commands
#region parameters
/// <summary>
/// Name of the PSVariable
/// Name of the PSVariable.
/// </summary>
[Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty()]
@ -292,9 +281,8 @@ namespace Microsoft.PowerShell.Commands
private bool _valueOnly;
/// <summary>
/// The Include parameter for all the variable commands
/// The Include parameter for all the variable commands.
/// </summary>
///
[Parameter]
public string[] Include
{
@ -310,9 +298,8 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// The Exclude parameter for all the variable commands
/// The Exclude parameter for all the variable commands.
/// </summary>
///
[Parameter]
public string[] Exclude
{
@ -378,7 +365,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Class implementing new-variable command
/// Class implementing new-variable command.
/// </summary>
[Cmdlet(VerbsCommon.New, "Variable", SupportsShouldProcess = true, HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113361")]
public sealed class NewVariableCommand : VariableCommandBase
@ -386,19 +373,19 @@ namespace Microsoft.PowerShell.Commands
#region parameters
/// <summary>
/// Name of the PSVariable
/// Name of the PSVariable.
/// </summary>
[Parameter(Position = 0, ValueFromPipelineByPropertyName = true, Mandatory = true)]
public string Name { get; set; }
/// <summary>
/// Value of the PSVariable
/// Value of the PSVariable.
/// </summary>
[Parameter(Position = 1, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true)]
public object Value { get; set; }
/// <summary>
/// Description of the variable
/// Description of the variable.
/// </summary>
[Parameter]
public string Description { get; set; }
@ -568,7 +555,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// This class implements set-variable command
/// This class implements set-variable command.
/// </summary>
[Cmdlet(VerbsCommon.Set, "Variable", SupportsShouldProcess = true, HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113401")]
[OutputType(typeof(PSVariable))]
@ -577,21 +564,20 @@ namespace Microsoft.PowerShell.Commands
#region parameters
/// <summary>
/// Name of the PSVariable(s) to set
/// Name of the PSVariable(s) to set.
/// </summary>
[Parameter(Position = 0, ValueFromPipelineByPropertyName = true, Mandatory = true)]
public string[] Name { get; set; }
/// <summary>
/// Value of the PSVariable
/// Value of the PSVariable.
/// </summary>
[Parameter(Position = 1, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true)]
public object Value { get; set; } = AutomationNull.Value;
/// <summary>
/// The Include parameter for all the variable commands
/// The Include parameter for all the variable commands.
/// </summary>
///
[Parameter]
public string[] Include
{
@ -607,9 +593,8 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// The Exclude parameter for all the variable commands
/// The Exclude parameter for all the variable commands.
/// </summary>
///
[Parameter]
public string[] Exclude
{
@ -625,7 +610,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Description of the variable
/// Description of the variable.
/// </summary>
[Parameter]
public string Description { get; set; }
@ -634,7 +619,6 @@ namespace Microsoft.PowerShell.Commands
/// The options for the variable to specify if the variable should
/// be ReadOnly, Constant, and/or Private.
/// </summary>
///
[Parameter]
public ScopedItemOptions Option
{
@ -707,8 +691,7 @@ namespace Microsoft.PowerShell.Commands
#endregion parameters
/// <summary>
/// Checks to see if the name and value parameters were
/// bound as formal parameters.
/// Checks to see if the name and value parameters were bound as formal parameters.
/// </summary>
protected override void BeginProcessing()
{
@ -732,7 +715,6 @@ namespace Microsoft.PowerShell.Commands
/// If name is not a formal parameter, then set
/// the variable each time ProcessRecord is called.
/// </summary>
///
protected override void ProcessRecord()
{
if (_nameIsFormalParameter && _valueIsFormalParameter)
@ -1020,7 +1002,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// The Remove-Variable cmdlet implementation
/// The Remove-Variable cmdlet implementation.
/// </summary>
[Cmdlet(VerbsCommon.Remove, "Variable", SupportsShouldProcess = true, HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113380")]
public sealed class RemoveVariableCommand : VariableCommandBase
@ -1028,15 +1010,14 @@ namespace Microsoft.PowerShell.Commands
#region parameters
/// <summary>
/// Name of the PSVariable(s) to set
/// Name of the PSVariable(s) to set.
/// </summary>
[Parameter(Position = 0, ValueFromPipelineByPropertyName = true, Mandatory = true)]
public string[] Name { get; set; }
/// <summary>
/// The Include parameter for all the variable commands
/// The Include parameter for all the variable commands.
/// </summary>
///
[Parameter]
public string[] Include
{
@ -1052,9 +1033,8 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// The Exclude parameter for all the variable commands
/// The Exclude parameter for all the variable commands.
/// </summary>
///
[Parameter]
public string[] Exclude
{
@ -1070,9 +1050,8 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// If true, the variable is removed even if it is ReadOnly
/// If true, the variable is removed even if it is ReadOnly.
/// </summary>
///
[Parameter]
public SwitchParameter Force
{
@ -1090,9 +1069,8 @@ namespace Microsoft.PowerShell.Commands
#endregion parameters
/// <summary>
/// Removes the matching variables from the specified scope
/// Removes the matching variables from the specified scope.
/// </summary>
///
protected override void ProcessRecord()
{
// Removal of variables only happens in the local scope if the
@ -1173,7 +1151,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// This class implements set-variable command
/// This class implements set-variable command.
/// </summary>
[Cmdlet(VerbsCommon.Clear, "Variable", SupportsShouldProcess = true, HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113285")]
[OutputType(typeof(PSVariable))]
@ -1182,15 +1160,14 @@ namespace Microsoft.PowerShell.Commands
#region parameters
/// <summary>
/// Name of the PSVariable(s) to set
/// Name of the PSVariable(s) to set.
/// </summary>
[Parameter(Position = 0, ValueFromPipelineByPropertyName = true, Mandatory = true)]
public string[] Name { get; set; }
/// <summary>
/// The Include parameter for all the variable commands
/// The Include parameter for all the variable commands.
/// </summary>
///
[Parameter]
public string[] Include
{
@ -1206,9 +1183,8 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// The Exclude parameter for all the variable commands
/// The Exclude parameter for all the variable commands.
/// </summary>
///
[Parameter]
public string[] Exclude
{
@ -1261,9 +1237,8 @@ namespace Microsoft.PowerShell.Commands
#endregion parameters
/// <summary>
/// The implementation of the Clear-Variable command
/// The implementation of the Clear-Variable command.
/// </summary>
///
protected override void ProcessRecord()
{
foreach (string varName in Name)
@ -1353,11 +1328,9 @@ namespace Microsoft.PowerShell.Commands
/// Clears the value of the variable using the PSVariable instance if the scope
/// was specified or using standard variable lookup if the scope was not specified.
/// </summary>
///
/// <param name="matchingVariable">
/// The variable that matched the name parameter(s).
/// </param>
///
private PSVariable ClearValue(PSVariable matchingVariable)
{
PSVariable result = matchingVariable;

View file

@ -17,7 +17,7 @@ namespace Microsoft.PowerShell.Commands
#region parameters
/// <summary>
/// An identifier for this event subscription
/// An identifier for this event subscription.
/// </summary>
[Parameter(Position = 0, ValueFromPipelineByPropertyName = true)]
public string SourceIdentifier
@ -62,7 +62,7 @@ namespace Microsoft.PowerShell.Commands
private WildcardPattern _matchPattern;
/// <summary>
/// Wait for the event to arrive
/// Wait for the event to arrive.
/// </summary>
protected override void ProcessRecord()
{
@ -101,7 +101,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Handle Control-C
/// Handle Control-C.
/// </summary>
protected override void StopProcessing()
{
@ -156,4 +156,4 @@ namespace Microsoft.PowerShell.Commands
}
}
}
}
}

View file

@ -14,7 +14,7 @@ using System.Text.RegularExpressions;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// Response object for html content without DOM parsing
/// Response object for html content without DOM parsing.
/// </summary>
public class BasicHtmlWebResponseObject : WebResponseObject
{
@ -32,7 +32,7 @@ namespace Microsoft.PowerShell.Commands
#region Constructors
/// <summary>
/// Constructor for BasicHtmlWebResponseObject
/// Constructor for BasicHtmlWebResponseObject.
/// </summary>
/// <param name="response"></param>
public BasicHtmlWebResponseObject(HttpResponseMessage response)
@ -40,7 +40,7 @@ namespace Microsoft.PowerShell.Commands
{ }
/// <summary>
/// Constructor for HtmlWebResponseObject with memory stream
/// Constructor for HtmlWebResponseObject with memory stream.
/// </summary>
/// <param name="response"></param>
/// <param name="contentStream"></param>
@ -57,12 +57,12 @@ namespace Microsoft.PowerShell.Commands
#region Properties
/// <summary>
/// gets or protected sets the Content property
/// Gets the Content property.
/// </summary>
public new string Content { get; private set; }
/// <summary>
/// Gets the Encoding that was used to decode the Content
/// Gets the Encoding that was used to decode the Content.
/// </summary>
/// <value>
/// The Encoding used to decode the Content; otherwise, a null reference if the content is not text.
@ -72,7 +72,7 @@ namespace Microsoft.PowerShell.Commands
private WebCmdletElementCollection _inputFields;
/// <summary>
/// gets the Fields property
/// Gets the Fields property.
/// </summary>
public WebCmdletElementCollection InputFields
{
@ -99,7 +99,7 @@ namespace Microsoft.PowerShell.Commands
private WebCmdletElementCollection _links;
/// <summary>
/// gets the Links property
/// Gets the Links property.
/// </summary>
public WebCmdletElementCollection Links
{
@ -126,7 +126,7 @@ namespace Microsoft.PowerShell.Commands
private WebCmdletElementCollection _images;
/// <summary>
/// gets the Images property
/// Gets the Images property.
/// </summary>
public WebCmdletElementCollection Images
{

View file

@ -17,7 +17,7 @@ namespace Microsoft.PowerShell.Commands
#region Parameters
/// <summary>
/// gets or sets the parameter Method
/// Gets or sets the parameter Method.
/// </summary>
[Parameter(ParameterSetName = "StandardMethod")]
[Parameter(ParameterSetName = "StandardMethodNoProxy")]
@ -28,7 +28,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// gets or sets the parameter CustomMethod
/// Gets or sets the parameter CustomMethod.
/// </summary>
[Parameter(Mandatory=true,ParameterSetName = "CustomMethod")]
[Parameter(Mandatory=true,ParameterSetName = "CustomMethodNoProxy")]
@ -41,7 +41,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// enable automatic following of rel links
/// Enable automatic following of rel links.
/// </summary>
[Parameter]
[Alias("FL")]
@ -52,7 +52,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// gets or sets the maximum number of rel links to follow
/// Gets or sets the maximum number of rel links to follow.
/// </summary>
[Parameter]
[Alias("ML")]
@ -222,18 +222,18 @@ namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// Return type not defined in response,
/// best effort detect
/// best effort detect.
/// </summary>
Detect,
/// <summary>
/// Json return type
/// Json return type.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
Json,
/// <summary>
/// Xml return type
/// Xml return type.
/// </summary>
Xml,
}

View file

@ -26,7 +26,7 @@ using System.Threading.Tasks;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// The valid values for the -Authentication parameter for Invoke-RestMethod and Invoke-WebRequest
/// The valid values for the -Authentication parameter for Invoke-RestMethod and Invoke-WebRequest.
/// </summary>
public enum WebAuthenticationType
{
@ -36,17 +36,17 @@ namespace Microsoft.PowerShell.Commands
None,
/// <summary>
/// RFC-7617 Basic Authentication. Requires -Credential
/// RFC-7617 Basic Authentication. Requires -Credential.
/// </summary>
Basic,
/// <summary>
/// RFC-6750 OAuth 2.0 Bearer Authentication. Requires -Token
/// RFC-6750 OAuth 2.0 Bearer Authentication. Requires -Token.
/// </summary>
Bearer,
/// <summary>
/// RFC-6750 OAuth 2.0 Bearer Authentication. Requires -Token
/// RFC-6750 OAuth 2.0 Bearer Authentication. Requires -Token.
/// </summary>
OAuth,
}
@ -54,7 +54,7 @@ namespace Microsoft.PowerShell.Commands
// WebSslProtocol is used because not all SslProtocols are supported by HttpClientHandler.
// Also SslProtocols.Default is not the "default" for HttpClientHandler as SslProtocols.Ssl3 is not supported.
/// <summary>
/// The valid values for the -SslProtocol parameter for Invoke-RestMethod and Invoke-WebRequest
/// The valid values for the -SslProtocol parameter for Invoke-RestMethod and Invoke-WebRequest.
/// </summary>
[Flags]
public enum WebSslProtocol
@ -75,7 +75,7 @@ namespace Microsoft.PowerShell.Commands
Tls11 = SslProtocols.Tls11,
/// <summary>
/// Specifies the TLS 1.2 security protocol. The TLS protocol is defined in IETF RFC 5246
/// Specifies the TLS 1.2 security protocol. The TLS protocol is defined in IETF RFC 5246.
/// </summary>
Tls12 = SslProtocols.Tls12
}
@ -96,7 +96,7 @@ namespace Microsoft.PowerShell.Commands
public virtual SwitchParameter UseBasicParsing { get; set; } = true;
/// <summary>
/// gets or sets the Uri property
/// Gets or sets the Uri property.
/// </summary>
[Parameter(Position = 0, Mandatory = true)]
[ValidateNotNullOrEmpty]
@ -106,13 +106,13 @@ namespace Microsoft.PowerShell.Commands
#region Session
/// <summary>
/// gets or sets the Session property
/// Gets or sets the Session property.
/// </summary>
[Parameter]
public virtual WebRequestSession WebSession { get; set; }
/// <summary>
/// gets or sets the SessionVariable property
/// Gets or sets the SessionVariable property.
/// </summary>
[Parameter]
[Alias("SV")]
@ -123,7 +123,7 @@ namespace Microsoft.PowerShell.Commands
#region Authorization and Credentials
/// <summary>
/// Gets or sets the AllowUnencryptedAuthentication property
/// Gets or sets the AllowUnencryptedAuthentication property.
/// </summary>
[Parameter]
public virtual SwitchParameter AllowUnencryptedAuthentication { get; set; }
@ -132,47 +132,47 @@ namespace Microsoft.PowerShell.Commands
/// Gets or sets the Authentication property used to determin the Authentication method for the web session.
/// Authentication does not work with UseDefaultCredentials.
/// Authentication over unencrypted sessions requires AllowUnencryptedAuthentication.
/// Basic: Requires Credential
/// OAuth/Bearer: Requires Token
/// Basic: Requires Credential.
/// OAuth/Bearer: Requires Token.
/// </summary>
[Parameter]
public virtual WebAuthenticationType Authentication { get; set; } = WebAuthenticationType.None;
/// <summary>
/// gets or sets the Credential property
/// Gets or sets the Credential property.
/// </summary>
[Parameter]
[Credential]
public virtual PSCredential Credential { get; set; }
/// <summary>
/// gets or sets the UseDefaultCredentials property
/// Gets or sets the UseDefaultCredentials property.
/// </summary>
[Parameter]
public virtual SwitchParameter UseDefaultCredentials { get; set; }
/// <summary>
/// gets or sets the CertificateThumbprint property
/// Gets or sets the CertificateThumbprint property.
/// </summary>
[Parameter]
[ValidateNotNullOrEmpty]
public virtual string CertificateThumbprint { get; set; }
/// <summary>
/// gets or sets the Certificate property
/// Gets or sets the Certificate property.
/// </summary>
[Parameter]
[ValidateNotNull]
public virtual X509Certificate Certificate { get; set; }
/// <summary>
/// gets or sets the SkipCertificateCheck property
/// Gets or sets the SkipCertificateCheck property.
/// </summary>
[Parameter]
public virtual SwitchParameter SkipCertificateCheck { get; set; }
/// <summary>
/// Gets or sets the TLS/SSL protocol used by the Web Cmdlet
/// Gets or sets the TLS/SSL protocol used by the Web Cmdlet.
/// </summary>
[Parameter]
public virtual WebSslProtocol SslProtocol { get; set; } = WebSslProtocol.Default;
@ -188,26 +188,26 @@ namespace Microsoft.PowerShell.Commands
#region Headers
/// <summary>
/// gets or sets the UserAgent property
/// Gets or sets the UserAgent property.
/// </summary>
[Parameter]
public virtual string UserAgent { get; set; }
/// <summary>
/// gets or sets the DisableKeepAlive property
/// Gets or sets the DisableKeepAlive property.
/// </summary>
[Parameter]
public virtual SwitchParameter DisableKeepAlive { get; set; }
/// <summary>
/// gets or sets the TimeOut property
/// Gets or sets the TimeOut property.
/// </summary>
[Parameter]
[ValidateRange(0, Int32.MaxValue)]
public virtual int TimeoutSec { get; set; }
/// <summary>
/// gets or sets the Headers property
/// Gets or sets the Headers property.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
[Parameter]
@ -218,7 +218,7 @@ namespace Microsoft.PowerShell.Commands
#region Redirect
/// <summary>
/// gets or sets the RedirectMax property
/// Gets or sets the RedirectMax property.
/// </summary>
[Parameter]
[ValidateRange(0, Int32.MaxValue)]
@ -248,7 +248,7 @@ namespace Microsoft.PowerShell.Commands
#region Method
/// <summary>
/// gets or sets the Method property
/// Gets or sets the Method property.
/// </summary>
[Parameter(ParameterSetName = "StandardMethod")]
[Parameter(ParameterSetName = "StandardMethodNoProxy")]
@ -260,7 +260,7 @@ namespace Microsoft.PowerShell.Commands
private WebRequestMethod _method = WebRequestMethod.Default;
/// <summary>
/// gets or sets the CustomMethod property
/// Gets or sets the CustomMethod property.
/// </summary>
[Parameter(Mandatory=true,ParameterSetName = "CustomMethod")]
[Parameter(Mandatory=true,ParameterSetName = "CustomMethodNoProxy")]
@ -278,7 +278,7 @@ namespace Microsoft.PowerShell.Commands
#region NoProxy
/// <summary>
/// gets or sets the NoProxy property
/// Gets or sets the NoProxy property.
/// </summary>
[Parameter(Mandatory=true,ParameterSetName = "CustomMethodNoProxy")]
[Parameter(Mandatory=true,ParameterSetName = "StandardMethodNoProxy")]
@ -289,14 +289,14 @@ namespace Microsoft.PowerShell.Commands
#region Proxy
/// <summary>
/// gets or sets the Proxy property
/// Gets or sets the Proxy property.
/// </summary>
[Parameter(ParameterSetName = "StandardMethod")]
[Parameter(ParameterSetName = "CustomMethod")]
public virtual Uri Proxy { get; set; }
/// <summary>
/// gets or sets the ProxyCredential property
/// Gets or sets the ProxyCredential property.
/// </summary>
[Parameter(ParameterSetName = "StandardMethod")]
[Parameter(ParameterSetName = "CustomMethod")]
@ -304,7 +304,7 @@ namespace Microsoft.PowerShell.Commands
public virtual PSCredential ProxyCredential { get; set; }
/// <summary>
/// gets or sets the ProxyUseDefaultCredentials property
/// Gets or sets the ProxyUseDefaultCredentials property.
/// </summary>
[Parameter(ParameterSetName = "StandardMethod")]
[Parameter(ParameterSetName = "CustomMethod")]
@ -315,7 +315,7 @@ namespace Microsoft.PowerShell.Commands
#region Input
/// <summary>
/// gets or sets the Body property
/// Gets or sets the Body property.
/// </summary>
[Parameter(ValueFromPipeline = true)]
public virtual object Body { get; set; }
@ -329,27 +329,26 @@ namespace Microsoft.PowerShell.Commands
public virtual IDictionary Form {get; set;}
/// <summary>
/// gets or sets the ContentType property
/// Gets or sets the ContentType property.
/// </summary>
[Parameter]
public virtual string ContentType { get; set; }
/// <summary>
/// gets or sets the TransferEncoding property
/// Gets or sets the TransferEncoding property.
/// </summary>
[Parameter]
[ValidateSet("chunked", "compress", "deflate", "gzip", "identity", IgnoreCase = true)]
public virtual string TransferEncoding { get; set; }
/// <summary>
/// gets or sets the InFile property
/// Gets or sets the InFile property.
/// </summary>
[Parameter]
public virtual string InFile { get; set; }
/// <summary>
/// keep the original file path after the resolved provider path is
/// assigned to InFile
/// Keep the original file path after the resolved provider path is assigned to InFile.
/// </summary>
private string _originalFilePath;
@ -358,13 +357,13 @@ namespace Microsoft.PowerShell.Commands
#region Output
/// <summary>
/// gets or sets the OutFile property
/// Gets or sets the OutFile property.
/// </summary>
[Parameter]
public virtual string OutFile { get; set; }
/// <summary>
/// gets or sets the PassThrough property
/// Gets or sets the PassThrough property.
/// </summary>
[Parameter]
public virtual SwitchParameter PassThru { get; set; }
@ -818,12 +817,12 @@ namespace Microsoft.PowerShell.Commands
// TODO: Merge Partials
/// <summary>
/// Exception class for webcmdlets to enable returning HTTP error response
/// Exception class for webcmdlets to enable returning HTTP error response.
/// </summary>
public sealed class HttpResponseException : HttpRequestException
{
/// <summary>
/// Constructor for HttpResponseException
/// Constructor for HttpResponseException.
/// </summary>
/// <param name="message">Message for the exception</param>
/// <param name="response">Response from the HTTP server</param>
@ -833,7 +832,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// HTTP error response
/// HTTP error response.
/// </summary>
public HttpResponseMessage Response { get; private set; }
}
@ -845,7 +844,7 @@ namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// gets or sets the PreserveAuthorizationOnRedirect property
/// Gets or sets the PreserveAuthorizationOnRedirect property.
/// </summary>
/// <remarks>
/// This property overrides compatibility with web requests on Windows.
@ -860,7 +859,7 @@ namespace Microsoft.PowerShell.Commands
public virtual SwitchParameter PreserveAuthorizationOnRedirect { get; set; }
/// <summary>
/// gets or sets the SkipHeaderValidation property
/// Gets or sets the SkipHeaderValidation property.
/// </summary>
/// <remarks>
/// This property adds headers to the request's header collection without validation.
@ -871,8 +870,7 @@ namespace Microsoft.PowerShell.Commands
#region Abstract Methods
/// <summary>
/// Read the supplied WebResponse object and push the
/// resulting output into the pipeline.
/// Read the supplied WebResponse object and push the resulting output into the pipeline.
/// </summary>
/// <param name="response">Instance of a WebResponse object to be processed</param>
internal abstract void ProcessResponse(HttpResponseMessage response);
@ -880,27 +878,27 @@ namespace Microsoft.PowerShell.Commands
#endregion Abstract Methods
/// <summary>
/// Cancellation token source
/// Cancellation token source.
/// </summary>
private CancellationTokenSource _cancelToken = null;
/// <summary>
/// Parse Rel Links
/// Parse Rel Links.
/// </summary>
internal bool _parseRelLink = false;
/// <summary>
/// Automatically follow Rel Links
/// Automatically follow Rel Links.
/// </summary>
internal bool _followRelLink = false;
/// <summary>
/// Automatically follow Rel Links
/// Automatically follow Rel Links.
/// </summary>
internal Dictionary<string, string> _relationLink = null;
/// <summary>
/// Maximum number of Rel Links to follow
/// Maximum number of Rel Links to follow.
/// </summary>
internal int _maximumFollowRelLink = Int32.MaxValue;
@ -1591,7 +1589,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Implementing ^C, after start the BeginGetResponse
/// Implementing ^C, after start the BeginGetResponse.
/// </summary>
protected override void StopProcessing()
{
@ -1917,7 +1915,6 @@ namespace Microsoft.PowerShell.Commands
return result;
}
#endregion Helper Methods
}
}

View file

@ -11,20 +11,20 @@ using System.Collections.Generic;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// WebResponseObject
/// WebResponseObject.
/// </summary>
public partial class WebResponseObject
{
#region Properties
/// <summary>
/// gets or protected sets the Content property
/// Gets or protected sets the Content property.
/// </summary>
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
public byte[] Content { get; protected set; }
/// <summary>
/// gets the StatusCode property
/// Gets the StatusCode property.
/// </summary>
public int StatusCode
{
@ -32,7 +32,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// gets the StatusDescription property
/// Gets the StatusDescription property.
/// </summary>
public string StatusDescription
{
@ -41,7 +41,7 @@ namespace Microsoft.PowerShell.Commands
private MemoryStream _rawContentStream;
/// <summary>
/// gets the RawContentStream property
/// Gets the RawContentStream property.
/// </summary>
public MemoryStream RawContentStream
{
@ -49,7 +49,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// gets the RawContentLength property
/// Gets the RawContentLength property.
/// </summary>
public long RawContentLength
{
@ -57,7 +57,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// gets or protected sets the RawContent property
/// Gets or protected sets the RawContent property.
/// </summary>
public string RawContent { get; protected set; }
@ -102,19 +102,19 @@ namespace Microsoft.PowerShell.Commands
// TODO: Merge Partials
/// <summary>
/// WebResponseObject
/// WebResponseObject.
/// </summary>
public partial class WebResponseObject
{
#region Properties
/// <summary>
/// gets or sets the BaseResponse property
/// Gets or sets the BaseResponse property.
/// </summary>
public HttpResponseMessage BaseResponse { get; set; }
/// <summary>
/// gets the Headers property
/// Gets the Headers property.
/// </summary>
public Dictionary<string, IEnumerable<string>> Headers
{
@ -132,7 +132,7 @@ namespace Microsoft.PowerShell.Commands
private Dictionary<string, IEnumerable<string>> _headers = null;
/// <summary>
/// gets the RelationLink property
/// Gets the RelationLink property.
/// </summary>
public Dictionary<string, string> RelationLink { get; internal set; }
@ -141,7 +141,7 @@ namespace Microsoft.PowerShell.Commands
#region Constructors
/// <summary>
/// Constructor for WebResponseObject
/// Constructor for WebResponseObject.
/// </summary>
/// <param name="response"></param>
public WebResponseObject(HttpResponseMessage response)
@ -149,7 +149,7 @@ namespace Microsoft.PowerShell.Commands
{ }
/// <summary>
/// Constructor for WebResponseObject with contentStream
/// Constructor for WebResponseObject with contentStream.
/// </summary>
/// <param name="response"></param>
/// <param name="contentStream"></param>
@ -207,7 +207,6 @@ namespace Microsoft.PowerShell.Commands
// set the position of the content stream to the beginning
_rawContentStream.Position = 0;
}
#endregion
}
}

View file

@ -9,8 +9,8 @@ using System.Reflection;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// The ConvertFrom-Json command
/// This command convert a Json string representation to a JsonObject
/// The ConvertFrom-Json command.
/// This command converts a Json string representation to a JsonObject.
/// </summary>
[Cmdlet(VerbsData.ConvertFrom, "Json", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=217031", RemotingCapability = RemotingCapability.None)]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]

View file

@ -21,8 +21,8 @@ using Newtonsoft.Json.Converters;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// The ConvertTo-Json command
/// This command convert an object to a Json string representation
/// The ConvertTo-Json command.
/// This command converts an object to a Json string representation.
/// </summary>
[Cmdlet(VerbsData.ConvertTo, "Json", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=217032", RemotingCapability = RemotingCapability.None)]
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
@ -30,7 +30,7 @@ namespace Microsoft.PowerShell.Commands
{
#region parameters
/// <summary>
/// gets or sets the InputObject property
/// Gets or sets the InputObject property.
/// </summary>
[Parameter(Position = 0, Mandatory = true, ValueFromPipeline = true)]
[AllowNull]
@ -40,7 +40,7 @@ namespace Microsoft.PowerShell.Commands
private const int maxDepthAllowed = 100;
/// <summary>
/// gets or sets the Depth property
/// Gets or sets the Depth property.
/// </summary>
[Parameter]
[ValidateRange(1, int.MaxValue)]
@ -78,7 +78,7 @@ namespace Microsoft.PowerShell.Commands
#region overrides
/// <summary>
/// Prerequisite checks
/// Prerequisite checks.
/// </summary>
protected override void BeginProcessing()
{
@ -96,7 +96,7 @@ namespace Microsoft.PowerShell.Commands
private List<object> _inputObjects = new List<object>();
/// <summary>
/// Caching the input objects for the convertto-json command
/// Caching the input objects for the convertto-json command.
/// </summary>
protected override void ProcessRecord()
{
@ -107,7 +107,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Do the conversion to json and write output
/// Do the conversion to json and write output.
/// </summary>
protected override void EndProcessing()
{
@ -144,7 +144,6 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// Return an alternate representation of the specified object that serializes the same JSON, except
/// that properties that cannot be evaluated are treated as having the value null.
///
/// Primitive types are returned verbatim. Aggregate types are processed recursively.
/// </summary>
/// <param name="obj">The object to be processed</param>

View file

@ -18,7 +18,7 @@ namespace Microsoft.PowerShell.Commands
#region Virtual Method Overrides
/// <summary>
/// Default constructor for InvokeWebRequestCommand
/// Default constructor for InvokeWebRequestCommand.
/// </summary>
public InvokeWebRequestCommand() : base()
{

View file

@ -6,32 +6,32 @@ using System.Collections.Generic;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// FormObject used in HtmlWebResponseObject
/// FormObject used in HtmlWebResponseObject.
/// </summary>
public class FormObject
{
/// <summary>
/// gets or private sets the Id property
/// Gets or private sets the Id property.
/// </summary>
public string Id { get; private set; }
/// <summary>
/// gets or private sets the Method property
/// Gets or private sets the Method property.
/// </summary>
public string Method { get; private set; }
/// <summary>
/// gets or private sets the Action property
/// Gets or private sets the Action property.
/// </summary>
public string Action { get; private set; }
/// <summary>
/// gets or private sets the Fields property
/// Gets or private sets the Fields property.
/// </summary>
public Dictionary<string, string> Fields { get; private set; }
/// <summary>
/// constructor for FormObject
/// Constructor for FormObject.
/// </summary>
/// <param name="id"></param>
/// <param name="method"></param>

View file

@ -7,12 +7,12 @@ using System.Collections.ObjectModel;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// FormObjectCollection used in HtmlWebResponseObject
/// FormObjectCollection used in HtmlWebResponseObject.
/// </summary>
public class FormObjectCollection : Collection<FormObject>
{
/// <summary>
/// Gets the FormObject from the key
/// Gets the FormObject from the key.
/// </summary>
/// <param name="key"></param>
/// <returns></returns>

View file

@ -19,7 +19,7 @@ using System.Reflection;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// JsonObject class
/// JsonObject class.
/// </summary>
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
public static class JsonObject

View file

@ -10,7 +10,7 @@ using System.Text.RegularExpressions;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// Construct the Useragent string
/// Construct the Useragent string.
/// </summary>
public static class PSUserAgent
{
@ -30,7 +30,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Useragent string for InternetExplorer (9.0)
/// Useragent string for InternetExplorer (9.0).
/// </summary>
public static string InternetExplorer
{
@ -45,7 +45,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Useragent string for Firefox (4.0)
/// Useragent string for Firefox (4.0).
/// </summary>
public static string FireFox
{
@ -60,7 +60,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Useragent string for Chrome (7.0)
/// Useragent string for Chrome (7.0).
/// </summary>
public static string Chrome
{
@ -75,7 +75,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Useragent string for Opera (9.0)
/// Useragent string for Opera (9.0).
/// </summary>
public static string Opera
{
@ -90,7 +90,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Useragent string for Safari (5.0)
/// Useragent string for Safari (5.0).
/// </summary>
public static string Safari
{

View file

@ -8,7 +8,7 @@ using System.Collections.Generic;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// WebCmdletElementCollection for elements in html web responses
/// WebCmdletElementCollection for elements in html web responses.
/// </summary>
public class WebCmdletElementCollection : ReadOnlyCollection<PSObject>
{
@ -18,10 +18,10 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Finds the element with name or id
/// Finds the element with name or id.
/// </summary>
/// <param name="nameOrId"></param>
/// <returns></returns>
/// <returns>Found element as PSObject.</returns>
public PSObject Find(string nameOrId)
{
// try Id first
@ -31,20 +31,20 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Finds the element by id
/// Finds the element by id.
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
/// <returns>Found element as PSObject.</returns>
public PSObject FindById(string id)
{
return Find(id, true);
}
/// <summary>
/// Finds the element by name
/// Finds the element by name.
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
/// <returns>Found element as PSObject.</returns>
public PSObject FindByName(string name)
{
return Find(name, false);

View file

@ -9,52 +9,52 @@ namespace Microsoft.PowerShell.Commands
public enum WebRequestMethod
{
/// <summary>
/// Default method
/// Default method.
/// </summary>
Default,
/// <summary>
/// GET method
/// GET method.
/// </summary>
Get,
/// <summary>
/// HEAD method
/// HEAD method.
/// </summary>
Head,
/// <summary>
/// POST method
/// POST method.
/// </summary>
Post,
/// <summary>
/// PUT method
/// PUT method.
/// </summary>
Put,
/// <summary>
/// DELETE method
/// DELETE method.
/// </summary>
Delete,
/// <summary>
/// TRACE method
/// TRACE method.
/// </summary>
Trace,
/// <summary>
/// OPTIONS method
/// OPTIONS method.
/// </summary>
Options,
/// <summary>
/// MERGE method
/// MERGE method.
/// </summary>
Merge,
/// <summary>
/// PATCH method
/// PATCH method.
/// </summary>
Patch,
}

View file

@ -14,35 +14,35 @@ namespace Microsoft.PowerShell.Commands
public class WebRequestSession
{
/// <summary>
/// gets or sets the Header property
/// Gets or sets the Header property.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public Dictionary<string, string> Headers { get; set; }
/// <summary>
/// gets or sets the content Headers when using HttpClient
/// Gets or sets the content Headers when using HttpClient.
/// </summary>
internal Dictionary<string, string> ContentHeaders { get; set; }
/// <summary>
/// gets or sets the Cookies property
/// Gets or sets the Cookies property.
/// </summary>
public CookieContainer Cookies { get; set; }
#region Credentials
/// <summary>
/// gets or sets the UseDefaultCredentials property
/// Gets or sets the UseDefaultCredentials property.
/// </summary>
public bool UseDefaultCredentials { get; set; }
/// <summary>
/// gets or sets the Credentials property
/// Gets or sets the Credentials property.
/// </summary>
public ICredentials Credentials { get; set; }
/// <summary>
/// gets or sets the Certificates property
/// Gets or sets the Certificates property.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public X509CertificateCollection Certificates { get; set; }
@ -50,17 +50,17 @@ namespace Microsoft.PowerShell.Commands
#endregion
/// <summary>
/// gets or sets the UserAgent property
/// Gets or sets the UserAgent property.
/// </summary>
public string UserAgent { get; set; }
/// <summary>
/// gets or sets the Proxy property
/// Gets or sets the Proxy property.
/// </summary>
public IWebProxy Proxy { get; set; }
/// <summary>
/// gets or sets the RedirectMax property
/// Gets or sets the RedirectMax property.
/// </summary>
public int MaximumRedirection { get; set; }

View file

@ -7,8 +7,7 @@ namespace Microsoft.PowerShell.Commands
{
#region WriteOutputCommand
/// <summary>
/// This class implements Write-output command
///
/// This class implements Write-Output command.
/// </summary>
[Cmdlet(VerbsCommunications.Write, "Output", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113427", RemotingCapability = RemotingCapability.None)]
public sealed class WriteOutputCommand : PSCmdlet
@ -16,7 +15,7 @@ namespace Microsoft.PowerShell.Commands
private PSObject[] _inputObjects = null;
/// <summary>
/// Holds the list of objects to be Written
/// Holds the list of objects to be written.
/// </summary>
[Parameter(Position = 0, Mandatory = true, ValueFromPipeline = true, ValueFromRemainingArguments = true)]
[AllowNull]
@ -28,8 +27,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Prevents Write-Output from unravelling collections passed to the InputObject
/// parameter.
/// Prevents Write-Output from unravelling collections passed to the InputObject parameter.
/// </summary>
[Parameter()]
public SwitchParameter NoEnumerate
@ -39,7 +37,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// This method implements the ProcessRecord method for Write-output command
/// This method implements the ProcessRecord method for Write-output command.
/// </summary>
protected override void ProcessRecord()
{

View file

@ -8,31 +8,27 @@ using Dbg = System.Management.Automation;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// The base class for the SetAliasCommand and NewAliasCommand
/// The base class for the SetAliasCommand and NewAliasCommand.
/// </summary>
///
public class WriteAliasCommandBase : PSCmdlet
{
#region Parameters
/// <summary>
/// The Name parameter for the command
/// The Name parameter for the command.
/// </summary>
///
[Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true)]
public string Name { get; set; }
/// <summary>
/// The Value parameter for the command
/// The Value parameter for the command.
/// </summary>
///
[Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true)]
public string Value { get; set; }
/// <summary>
/// The description for the alias.
/// </summary>
///
[Parameter]
public string Description { get; set; } = String.Empty;
@ -41,15 +37,12 @@ namespace Microsoft.PowerShell.Commands
/// ReadOnly (for existing aliases) and/or Constant (only
/// for new aliases).
/// </summary>
///
[Parameter]
public ScopedItemOptions Option { get; set; } = ScopedItemOptions.None;
/// <summary>
/// If set to true, the alias that is set is passed to the
/// pipeline.
/// If set to true, the alias that is set is passed to the pipeline.
/// </summary>
///
[Parameter]
public SwitchParameter PassThru
{
@ -66,10 +59,8 @@ namespace Microsoft.PowerShell.Commands
private bool _passThru;
/// <summary>
/// The scope parameter for the command determines
/// which scope the alias is set in.
/// The scope parameter for the command determines which scope the alias is set in.
/// </summary>
///
[Parameter]
public string Scope { get; set; }
@ -77,7 +68,6 @@ namespace Microsoft.PowerShell.Commands
/// If set to true and an existing alias of the same name exists
/// and is ReadOnly, the alias will be overwritten.
/// </summary>
///
[Parameter]
public SwitchParameter Force
{
@ -93,6 +83,5 @@ namespace Microsoft.PowerShell.Commands
}
private bool _force;
#endregion Parameters
}
}

View file

@ -9,34 +9,21 @@ using System.Text;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
///
/// Class comment
///
/// WriteHost cmdlet.
/// </summary>
[Cmdlet(VerbsCommunications.Write, "Host", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113426", RemotingCapability = RemotingCapability.None)]
public sealed class WriteHostCommand : ConsoleColorCmdlet
{
//
// Parameters
//
/// <summary>
///
/// Object to be output.
///
/// </summary>
[Parameter(Position = 0, ValueFromRemainingArguments = true, ValueFromPipeline = true)]
[Alias("Msg", "Message")]
public object Object { get; set; } = null;
/// <summary>
///
/// False to add a newline to the end of the output string, true if not.
///
/// </summary>
[Parameter]
public SwitchParameter NoNewline
{
@ -51,19 +38,15 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
///
/// The separator to print between objects
///
/// Gets and sets the separator to print between objects.
/// </summary>
/// <value></value>
[Parameter]
public object Separator { get; set; } = " ";
//
// Cmdlet Overrides
//
private string ProcessObject(object o)
{
if (o != null)
@ -113,9 +96,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
///
/// Outputs the object to the host console, with optional newline
///
/// Outputs the object to the host console, with optional newline.
/// </summary>
protected override void ProcessRecord()
{
@ -141,4 +122,4 @@ namespace Microsoft.PowerShell.Commands
private Boolean _notAppendNewline = false;
}
} // namespace Microsoft.PowerShell.Commands
}

View file

@ -9,21 +9,14 @@ using Dbg = System.Management.Automation.Diagnostics;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
///
/// Implements the write-progress cmdlet
///
/// Implements the write-progress cmdlet.
/// </summary>
[Cmdlet(VerbsCommunications.Write, "Progress", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113428", RemotingCapability = RemotingCapability.None)]
public sealed class WriteProgressCommand : PSCmdlet
{
/// <summary>
///
/// Describes the activity for which progress is being reported.
///
/// </summary>
/// <value></value>
[Parameter(
Position = 0,
Mandatory = true,
@ -32,12 +25,8 @@ namespace Microsoft.PowerShell.Commands
public string Activity { get; set; }
/// <summary>
///
/// Describes the current state of the activity.
///
/// </summary>
/// <value></value>
[Parameter(
Position = 1,
HelpMessageBaseName = HelpMessageBaseName,
@ -46,66 +35,42 @@ namespace Microsoft.PowerShell.Commands
public string Status { get; set; } = WriteProgressResourceStrings.Processing;
/// <summary>
///
/// Uniquely identifies this activity for purposes of chaining subordinate activities.
///
/// </summary>
/// <value></value>
[Parameter(Position = 2)]
[ValidateRange(0, Int32.MaxValue)]
public int Id { get; set; } = 0;
/// <summary>
///
/// Percentage completion of the activity, or -1 if n/a
///
/// Percentage completion of the activity, or -1 if n/a.
/// </summary>
/// <value></value>
[Parameter]
[ValidateRange(-1, 100)]
public int PercentComplete { get; set; } = -1;
/// <summary>
///
/// Seconds remaining to complete the operation, or -1 if n/a
///
/// Seconds remaining to complete the operation, or -1 if n/a.
/// </summary>
/// <value></value>
[Parameter]
public int SecondsRemaining { get; set; } = -1;
/// <summary>
///
/// Description of current operation in activity, empty if n/a
///
/// Description of current operation in activity, empty if n/a.
/// </summary>
/// <value></value>
[Parameter]
public string CurrentOperation { get; set; }
/// <summary>
///
/// Identifies the parent Id of this activity, or -1 if none.
///
/// </summary>
/// <value></value>
[Parameter]
[ValidateRange(-1, Int32.MaxValue)]
public int ParentId { get; set; } = -1;
/// <summary>
///
/// Identifies whether the activity has completed (and the display for it should be removed),
/// or if it is proceeding (and the display for it should be shown).
///
/// </summary>
/// <value></value>
[Parameter]
public SwitchParameter Completed
{
@ -120,21 +85,14 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
///
/// Identifies the source of the record.
///
/// </summary>
/// <value></value>
[Parameter]
public int SourceId { get; set; }
/// <summary>
///
/// Writes a ProgressRecord created from the parameters.
///
/// </summary>
protected override
void
ProcessRecord()
@ -154,4 +112,3 @@ namespace Microsoft.PowerShell.Commands
private const string HelpMessageBaseName = "WriteProgressResourceStrings";
}
}

View file

@ -18,7 +18,7 @@ using Dbg = System.Management.Automation.Diagnostics;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// implementation for the Export-Clixml command
/// Implementation for the Export-Clixml command.
/// </summary>
[Cmdlet(VerbsData.Export, "Clixml", SupportsShouldProcess = true, DefaultParameterSetName = "ByPath", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113297")]
public sealed class ExportClixmlCommand : PSCmdlet, IDisposable
@ -29,20 +29,20 @@ namespace Microsoft.PowerShell.Commands
// implementation will need to be modified.
/// <summary>
/// Depth of serialization
/// Depth of serialization.
/// </summary>
[Parameter]
[ValidateRange(1, int.MaxValue)]
public int Depth { get; set; } = 0;
/// <summary>
/// mandatory file name to write to
/// Mandatory file name to write to.
/// </summary>
[Parameter(Mandatory = true, Position = 0, ParameterSetName = "ByPath")]
public string Path { get; set; }
/// <summary>
/// mandatory file name to write to
/// Mandatory file name to write to.
/// </summary>
[Parameter(Mandatory = true, ParameterSetName = "ByLiteralPath")]
[Alias("PSPath","LP")]
@ -61,7 +61,7 @@ namespace Microsoft.PowerShell.Commands
private bool _isLiteralPath = false;
/// <summary>
/// Input object to be exported
/// Input object to be exported.
/// </summary>
[Parameter(ValueFromPipeline = true, Mandatory = true)]
[AllowNull]
@ -103,9 +103,8 @@ namespace Microsoft.PowerShell.Commands
private bool _noclobber;
/// <summary>
/// Encoding optional flag
/// Encoding optional flag.
/// </summary>
///
[Parameter]
[ArgumentToEncodingTransformationAttribute()]
[ArgumentCompletions(
@ -127,7 +126,7 @@ namespace Microsoft.PowerShell.Commands
#region Overrides
/// <summary>
/// BeginProcessing override
/// BeginProcessing override.
/// </summary>
protected override
void
@ -179,22 +178,22 @@ namespace Microsoft.PowerShell.Commands
#region file
/// <summary>
/// handle to file stream
/// Handle to file stream.
/// </summary>
private FileStream _fs;
/// <summary>
/// stream writer used to write to file
/// Stream writer used to write to file.
/// </summary>
private XmlWriter _xw;
/// <summary>
/// Serializer used for serialization
/// Serializer used for serialization.
/// </summary>
private Serializer _serializer;
/// <summary>
/// FileInfo of file to clear read-only flag when operation is complete
/// FileInfo of file to clear read-only flag when operation is complete.
/// </summary>
private FileInfo _readOnlyFileInfo = null;
@ -257,12 +256,12 @@ namespace Microsoft.PowerShell.Commands
#region IDisposable Members
/// <summary>
/// Set to true when object is disposed
/// Set to true when object is disposed.
/// </summary>
private bool _disposed;
/// <summary>
/// public dispose method
/// Public dispose method.
/// </summary>
public
void
@ -279,7 +278,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Implements Import-Clixml command
/// Implements Import-Clixml command.
/// </summary>
[Cmdlet(VerbsData.Import, "Clixml", SupportsPaging = true, DefaultParameterSetName = "ByPath", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113340")]
public sealed class ImportClixmlCommand : PSCmdlet, IDisposable
@ -287,13 +286,13 @@ namespace Microsoft.PowerShell.Commands
#region Command Line Parameters
/// <summary>
/// mandatory file name to read from
/// Mandatory file name to read from.
/// </summary>
[Parameter(Position = 0, Mandatory = true, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "ByPath")]
public String[] Path { get; set; }
/// <summary>
/// mandatory file name to read from
/// Mandatory file name to read from.
/// </summary>
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "ByLiteralPath")]
[Alias("PSPath","LP")]
@ -319,7 +318,7 @@ namespace Microsoft.PowerShell.Commands
private bool _disposed = false;
/// <summary>
/// public dispose method
/// Public dispose method.
/// </summary>
public void Dispose()
{
@ -340,7 +339,7 @@ namespace Microsoft.PowerShell.Commands
private ImportXmlHelper _helper;
/// <summary>
/// ProcessRecord overload
/// ProcessRecord overload.
/// </summary>
protected override void ProcessRecord()
{
@ -365,7 +364,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// implementation for the convertto-xml command
/// Implementation for the convertto-xml command.
/// </summary>
[Cmdlet(VerbsData.ConvertTo, "Xml", SupportsShouldProcess = false,
HelpUri = "https://go.microsoft.com/fwlink/?LinkID=135204", RemotingCapability = RemotingCapability.None)]
@ -375,14 +374,14 @@ namespace Microsoft.PowerShell.Commands
#region Command Line Parameters
/// <summary>
/// Depth of serialization
/// Depth of serialization.
/// </summary>
[Parameter(HelpMessage = "Specifies how many levels of contained objects should be included in the XML representation")]
[ValidateRange(1, int.MaxValue)]
public int Depth { get; set; } = 0;
/// <summary>
/// Input Object which is written to XML format
/// Input Object which is written to XML format.
/// </summary>
[Parameter(Position = 0, ValueFromPipeline = true, Mandatory = true)]
[AllowNull]
@ -418,7 +417,7 @@ namespace Microsoft.PowerShell.Commands
#region Overrides
/// <summary>
/// BeginProcessing override
/// BeginProcessing override.
/// </summary>
protected override void BeginProcessing()
{
@ -434,7 +433,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// override ProcessRecord
/// Override ProcessRecord.
/// </summary>
protected override void ProcessRecord()
{
@ -505,7 +504,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
///
/// StopProcessing.
/// </summary>
protected override void StopProcessing()
{
@ -517,17 +516,17 @@ namespace Microsoft.PowerShell.Commands
#region memory
/// <summary>
/// XmlText writer
/// XmlText writer.
/// </summary>
private XmlWriter _xw;
/// <summary>
/// Serializer used for serialization
/// Serializer used for serialization.
/// </summary>
private CustomSerialization _serializer;
/// <summary>
/// Memory Stream used for serialization
/// Memory Stream used for serialization.
/// </summary>
private MemoryStream _ms;
@ -599,12 +598,12 @@ namespace Microsoft.PowerShell.Commands
#region IDisposable Members
/// <summary>
/// Set to true when object is disposed
/// Set to true when object is disposed.
/// </summary>
private bool _disposed;
/// <summary>
/// public dispose method
/// Public dispose method.
/// </summary>
public
void
@ -621,19 +620,19 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Helper class to import single XML file
/// Helper class to import single XML file.
/// </summary>
internal class ImportXmlHelper : IDisposable
{
#region constructor
/// <summary>
/// XML file to import
/// XML file to import.
/// </summary>
private readonly string _path;
/// <summary>
/// Reference to cmdlet which is using this helper class
/// Reference to cmdlet which is using this helper class.
/// </summary>
private readonly PSCmdlet _cmdlet;
private bool _isLiteralPath;
@ -652,12 +651,12 @@ namespace Microsoft.PowerShell.Commands
#region file
/// <summary>
/// handle to file stream
/// Handle to file stream.
/// </summary>
internal FileStream _fs;
/// <summary>
/// XmlReader used to read file
/// XmlReader used to read file.
/// </summary>
internal XmlReader _xr;
@ -699,12 +698,12 @@ namespace Microsoft.PowerShell.Commands
#region IDisposable Members
/// <summary>
/// Set to true when object is disposed
/// Set to true when object is disposed.
/// </summary>
private bool _disposed;
/// <summary>
/// public dispose method
/// Public dispose method.
/// </summary>
public void Dispose()
{
@ -808,8 +807,7 @@ namespace Microsoft.PowerShell.Commands
{
# region parameters
/// <summary>
/// Specifies the path which contains the xml files. The default is the current
/// user directory
/// Specifies the path which contains the xml files. The default is the current user directory.
/// </summary>
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
[Parameter(Position = 1, Mandatory = true,
@ -819,8 +817,7 @@ namespace Microsoft.PowerShell.Commands
public String[] Path { get; set; }
/// <summary>
/// Specifies the literal path which contains the xml files. The default is the current
/// user directory
/// Specifies the literal path which contains the xml files. The default is the current user directory.
/// </summary>
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "LiteralPath")]
@ -839,7 +836,7 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// The following is the definition of the input parameter "XML".
/// Specifies the xml Node
/// Specifies the xml Node.
/// </summary>
[Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true,
ParameterSetName = "Xml")]
@ -869,8 +866,7 @@ namespace Microsoft.PowerShell.Commands
public string XPath { get; set; }
/// <summary>
/// The following definition used to specify the
/// NameSpace of xml.
/// The following definition used to specify the NameSpace of xml.
/// </summary>
[Parameter]
[ValidateNotNullOrEmpty]
@ -1095,7 +1091,7 @@ namespace Microsoft.PowerShell.Commands
private const string SimpleFormat = "{0}";
/// <summary>
/// The XmlNode that matches search
/// The XmlNode that matches search.
/// </summary>
[SuppressMessage("Microsoft.Design", "CA1059:MembersShouldNotExposeCertainConcreteTypes", MessageId = "System.Xml.XmlNode")]
public XmlNode Node { get; set; }
@ -1124,7 +1120,7 @@ namespace Microsoft.PowerShell.Commands
private string _path;
/// <summary>
/// The pattern used to search
/// The pattern used to search.
/// </summary>
public string Pattern { get; set; }
@ -1139,7 +1135,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Return String representation of the object
/// Return String representation of the object.
/// </summary>
/// <param name="directory"></param>
/// <returns></returns>

View file

@ -481,4 +481,3 @@ namespace Microsoft.PowerShell.Commands
}
}
}

View file

@ -15,9 +15,7 @@ using Microsoft.PowerShell.Commands.Internal.Format;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
///
/// Class comment
///
/// Class comment.
/// </summary>
[Cmdlet(VerbsData.ConvertTo, "Html", DefaultParameterSetName = "Page",
@ -42,8 +40,8 @@ namespace Microsoft.PowerShell.Commands
private PSObject _inputObject;
/// <summary>
/// The list of properties to display
/// These take the form of a PSPropertyExpression
/// The list of properties to display.
/// These take the form of a PSPropertyExpression.
/// </summary>
/// <value></value>
[Parameter(Position = 0)]
@ -61,8 +59,7 @@ namespace Microsoft.PowerShell.Commands
private object[] _property;
/// <summary>
/// Text to go after the opening body tag
/// and before the table
/// Text to go after the opening body tag and before the table.
/// </summary>
/// <value></value>
[Parameter(ParameterSetName = "Page", Position = 3)]
@ -80,8 +77,7 @@ namespace Microsoft.PowerShell.Commands
private string[] _body;
/// <summary>
/// Text to go into the head section
/// of the html doc
/// Text to go into the head section of the html doc.
/// </summary>
/// <value></value>
[Parameter(ParameterSetName = "Page", Position = 1)]
@ -146,7 +142,7 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// This specifies a full or partial URI
/// for the CSS information.
/// The html should reference the css file specified
/// The HTML should reference the CSS file specified.
/// </summary>
[Parameter(ParameterSetName = "Page")]
[Alias("cu", "uri")]
@ -187,8 +183,7 @@ namespace Microsoft.PowerShell.Commands
private SwitchParameter _fragment;
/// <summary>
/// Specifies the text to include prior the
/// closing body tag of the HTML output
/// Specifies the text to include prior the closing body tag of the HTML output.
/// </summary>
[Parameter]
[ValidateNotNullOrEmpty]
@ -207,8 +202,7 @@ namespace Microsoft.PowerShell.Commands
private string[] _postContent;
/// <summary>
/// Specifies the text to include after the
/// body tag of the HTML output
/// Specifies the text to include after the body tag of the HTML output.
/// </summary>
[Parameter]
[ValidateNotNullOrEmpty]
@ -227,7 +221,7 @@ namespace Microsoft.PowerShell.Commands
private string[] _preContent;
/// <summary>
/// Sets and Gets the meta property of the HTML head
/// Sets and Gets the meta property of the HTML head.
/// </summary>
/// <returns></returns>
[Parameter(ParameterSetName = "Page")]
@ -248,7 +242,7 @@ namespace Microsoft.PowerShell.Commands
private bool _metaSpecified = false;
/// <summary>
/// Specifies the charset encoding for the HTML document
/// Specifies the charset encoding for the HTML document.
/// </summary>
[Parameter(ParameterSetName = "Page")]
[ValidateNotNullOrEmpty]
@ -270,7 +264,7 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// When this switch statement is specified,
/// it will change the DOCTYPE to XHTML Transitional DTD
/// it will change the DOCTYPE to XHTML Transitional DTD.
/// </summary>
/// <returns></returns>
[Parameter(ParameterSetName = "Page")]
@ -289,7 +283,7 @@ namespace Microsoft.PowerShell.Commands
private bool _transitional = false;
/// <summary>
/// definitions for hash table keys
/// Definitions for hash table keys.
/// </summary>
internal static class ConvertHTMLParameterDefinitionKeys
{
@ -299,7 +293,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// This allows for @{e='foo';label='bar';alignment='center';width='20'}
/// This allows for @{e='foo';label='bar';alignment='center';width='20'}.
/// </summary>
internal class ConvertHTMLExpressionParameterDefinition : CommandParameterDefinition
{
@ -313,7 +307,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Create a list of MshParameter from properties
/// Create a list of MshParameter from properties.
/// </summary>
/// <param name="properties">can be a string, ScriptBlock, or Hashtable</param>
/// <returns></returns>
@ -330,7 +324,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Resolve all wildcards in user input Property into resolvedNameMshParameters
/// Resolve all wildcards in user input Property into resolvedNameMshParameters.
/// </summary>
private void InitializeResolvedNameMshParameters()
{
@ -376,7 +370,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// calls ToString. If an exception occurs, eats it and return string.Empty
/// Calls ToString. If an exception occurs, eats it and return string.Empty.
/// </summary>
/// <param name="obj"></param>
/// <returns></returns>
@ -496,7 +490,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Reads Width and Alignment from Property and write Col tags
/// Reads Width and Alignment from Property and write Col tags.
/// </summary>
/// <param name="mshParams"></param>
private void WriteColumns(List<MshParameter> mshParams)
@ -531,7 +525,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Writes the list entries when the As parameter has value List
/// Writes the list entries when the As parameter has value List.
/// </summary>
private void WriteListEntry()
{
@ -555,7 +549,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// To write the Property name
/// To write the Property name.
/// </summary>
private void WritePropertyName(StringBuilder Listtag, MshParameter p)
{
@ -573,7 +567,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// To write the Property value
/// To write the Property value.
/// </summary>
private void WritePropertyValue(StringBuilder Listtag, MshParameter p)
{
@ -598,7 +592,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// To write the Table header for the object property names
/// To write the Table header for the object property names.
/// </summary>
private void WriteTableHeader(StringBuilder THtag, List<MshParameter> resolvedNameMshParameters)
{
@ -612,7 +606,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// To write the Table row for the object property values
/// To write the Table row for the object property values.
/// </summary>
private void WriteTableRow(StringBuilder TRtag, List<MshParameter> resolvedNameMshParameters)
{
@ -705,7 +699,7 @@ namespace Microsoft.PowerShell.Commands
#region private
/// <summary>
/// list of incoming objects to compare
/// list of incoming objects to compare.
/// </summary>
private bool _isTHWritten;
private StringCollection _propertyCollector;
@ -716,4 +710,3 @@ namespace Microsoft.PowerShell.Commands
#endregion private
}
}

Some files were not shown because too many files have changed in this diff Show more