Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,7 @@ internal InvocationContext(string computerName, CimInstance targetCimInstance)
/// return value could be null
/// </remarks>
/// </summary>
internal virtual string ComputerName
{
get;
private set;
}
internal virtual string ComputerName { get; }

/// <summary>
/// <para>
Expand All @@ -109,11 +105,7 @@ internal virtual string ComputerName
/// return value could be null
/// </remarks>
/// </summary>
internal virtual CimInstance TargetCimInstance
{
get;
private set;
}
internal virtual CimInstance TargetCimInstance { get; }
}
#endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ internal CimCmdletDefinitionContext(
_privateData = privateData;
}

public string CmdletizationClassName { get; private set; }
public string CmdletizationClassName { get; }

public string CmdletizationClassVersion { get; private set; }
public string CmdletizationClassVersion { get; }

public Version CmdletizationModuleVersion { get; private set; }
public Version CmdletizationModuleVersion { get; }

public bool SupportsShouldProcess { get; private set; }
public bool SupportsShouldProcess { get; }

private readonly IDictionary<string, string> _privateData;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,21 +81,21 @@ private static void WarnAboutUnsupportedActionPreferences(
}
}

public CimCmdletDefinitionContext CmdletDefinitionContext { get; private set; }
public CimCmdletDefinitionContext CmdletDefinitionContext { get; }

public InvocationInfo CmdletInvocationInfo { get; private set; }
public InvocationInfo CmdletInvocationInfo { get; }

public MshCommandRuntime.ShouldProcessPossibleOptimization ShouldProcessOptimization { get; private set; }
public MshCommandRuntime.ShouldProcessPossibleOptimization ShouldProcessOptimization { get; }

public ActionPreference ErrorActionPreference { get; private set; }
public ActionPreference ErrorActionPreference { get; }

public ActionPreference WarningActionPreference { get; private set; }
public ActionPreference WarningActionPreference { get; }

public ActionPreference VerboseActionPreference { get; private set; }
public ActionPreference VerboseActionPreference { get; }

public ActionPreference DebugActionPreference { get; private set; }
public ActionPreference DebugActionPreference { get; }

public string NamespaceOverride { get; private set; }
public string NamespaceOverride { get; }

public bool IsRunningInBackground
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ internal CimJobContext(
this.TargetObject = targetObject ?? this.ClassName;
}

public CimCmdletInvocationContext CmdletInvocationContext { get; private set; }
public CimCmdletInvocationContext CmdletInvocationContext { get; }

public CimSession Session { get; private set; }
public CimSession Session { get; }

public object TargetObject { get; private set; }
public object TargetObject { get; }

public string ClassName
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ internal class CimQuery : QueryBuilder, ISessionBoundQueryBuilder<CimSession>

internal readonly Dictionary<string, object> queryOptions = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);

internal ClientSideQuery ClientSideQuery { get; private set; }
internal ClientSideQuery ClientSideQuery { get; }

internal CimQuery()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ public NotFoundError(string propertyName, object propertyValue, bool wildcardsEn
}
}

public string PropertyName { get; private set; }
public string PropertyName { get; }

public object PropertyValue { get; private set; }
public object PropertyValue { get; }

public Func<string, string, string> ErrorMessageGenerator { get; private set; }
public Func<string, string, string> ErrorMessageGenerator { get; }

private static string GetErrorMessageForNotFound(string queryDescription, string className)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ public sealed class RestartComputerTimeoutException : RuntimeException
/// <summary>
/// Name of the computer that is restarting.
/// </summary>
public string ComputerName { get; private set; }
public string ComputerName { get; }

/// <summary>
/// The timeout value specified by the user. It indicates the seconds to wait before timeout.
/// </summary>
public int Timeout { get; private set; }
public int Timeout { get; }

/// <summary>
/// Construct a RestartComputerTimeoutException.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,41 +26,25 @@ public sealed class PSRunspaceDebug
/// debugger is currently attached. The script or command will remain stopped until
/// a debugger is attached to debug the breakpoint.
/// </summary>
public bool Enabled
{
get;
private set;
}
public bool Enabled { get; }

/// <summary>
/// When true this property will cause any running command or script in the Runspace
/// to stop in step mode, regardless of whether a debugger is currently attached. The
/// script or command will remain stopped until a debugger is attached to debug the
/// current stop point.
/// </summary>
public bool BreakAll
{
get;
private set;
}
public bool BreakAll { get; }

/// <summary>
/// Name of runspace for which the options apply.
/// </summary>
public string RunspaceName
{
get;
private set;
}
public string RunspaceName { get; }

/// <summary>
/// Local Id of runspace for which the options apply.
/// </summary>
public int RunspaceId
{
get;
private set;
}
public int RunspaceId { get; }

#endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,31 +116,31 @@ internal static IEnumerable<object> GetObjectEnumerable(System.Collections.IEnum
/// <summary>
/// A string representing the definition of the command.
/// </summary>
public string Name { get; private set; }
public string Name { get; }

/// <summary>
/// A string representing module the command belongs to.
/// </summary>
public string ModuleName { get; private set; }
public string ModuleName { get; }

/// <summary>
/// A reference to the module the command came from.
/// </summary>
public ShowCommandModuleInfo Module { get; private set; }
public ShowCommandModuleInfo Module { get; }

/// <summary>
/// An enumeration of the command types this command belongs to.
/// </summary>
public CommandTypes CommandType { get; private set; }
public CommandTypes CommandType { get; }

/// <summary>
/// A string representing the definition of the command.
/// </summary>
public string Definition { get; private set; }
public string Definition { get; }

/// <summary>
/// A string representing the definition of the command.
/// </summary>
public ICollection<ShowCommandParameterSetInfo> ParameterSets { get; private set; }
public ICollection<ShowCommandParameterSetInfo> ParameterSets { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ public ShowCommandModuleInfo(PSObject other)
/// <summary>
/// Gets the name of this module.
/// </summary>
public string Name { get; private set; }
public string Name { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,37 +68,37 @@ public ShowCommandParameterInfo(PSObject other)
/// <summary>
/// Gets the name of the parameter.
/// </summary>
public string Name { get; private set; }
public string Name { get; }

/// <remarks>
/// True if the parameter is dynamic, or false otherwise.
/// </remarks>
public bool IsMandatory { get; private set; }
public bool IsMandatory { get; }

/// <summary>
/// Gets whether the parameter can take values from the incoming pipeline object.
/// </summary>
public bool ValueFromPipeline { get; private set; }
public bool ValueFromPipeline { get; }

/// <summary>
/// Gets the type of the parameter.
/// </summary>
public ShowCommandParameterType ParameterType { get; private set; }
public ShowCommandParameterType ParameterType { get; }

/// <summary>
/// The possible values of this parameter.
/// </summary>
public IList<string> ValidParamSetValues { get; private set; }
public IList<string> ValidParamSetValues { get; }

/// <summary>
/// Gets whether the parameter has a parameter set.
/// </summary>
public bool HasParameterSet { get; private set; }
public bool HasParameterSet { get; }

/// <summary>
/// Gets the position in which the parameter can be specified on the command line
/// if not named. If the returned value is int.MinValue then the parameter must be named.
/// </summary>
public int Position { get; private set; }
public int Position { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@ public ShowCommandParameterSetInfo(PSObject other)
/// <summary>
/// Gets the name of the parameter set.
/// </summary>
public string Name { get; private set; }
public string Name { get; }

/// <summary>
/// Gets whether the parameter set is the default parameter set.
/// </summary>
public bool IsDefault { get; private set; }
public bool IsDefault { get; }

/// <summary>
/// Gets the parameter information for the parameters in this parameter set.
/// </summary>
public ICollection<ShowCommandParameterInfo> Parameters { get; private set; }
public ICollection<ShowCommandParameterInfo> Parameters { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,32 +74,32 @@ public ShowCommandParameterType(PSObject other)
/// <summary>
/// The full name of the outermost type.
/// </summary>
public string FullName { get; private set; }
public string FullName { get; }

/// <summary>
/// Whether or not this type is an enum.
/// </summary>
public bool IsEnum { get; private set; }
public bool IsEnum { get; }

/// <summary>
/// Whether or not this type is an dictionary.
/// </summary>
public bool ImplementsDictionary { get; private set; }
public bool ImplementsDictionary { get; }

/// <summary>
/// Whether or not this enum has a flag attribute.
/// </summary>
public bool HasFlagAttribute { get; private set; }
public bool HasFlagAttribute { get; }

/// <summary>
/// Whether or not this type is an array type.
/// </summary>
public bool IsArray { get; private set; }
public bool IsArray { get; }

/// <summary>
/// Gets the inner type, if this corresponds to an array type.
/// </summary>
public ShowCommandParameterType ElementType { get; private set; }
public ShowCommandParameterType ElementType { get; }

/// <summary>
/// Whether or not this type is a string.
Expand Down Expand Up @@ -148,6 +148,6 @@ public bool IsSwitch
/// <summary>
/// If this is an enum value, return the list of potential values.
/// </summary>
public ArrayList EnumValues { get; private set; }
public ArrayList EnumValues { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,12 @@ private set
/// Gets underlying bytes stored in the collection.
/// </summary>
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
public byte[] Bytes { get; private set; }
public byte[] Bytes { get; }

/// <summary>
/// Gets the path of the file whose contents are wrapped in the ByteCollection.
/// </summary>
public string Path { get; private set; }
public string Path { get; }

/// <summary>
/// Gets the hexadecimal representation of the <see cref="Offset64"/> value.
Expand All @@ -226,7 +226,7 @@ private set
/// <summary>
/// Gets the type of the input objects used to create the <see cref="ByteCollection"/>.
/// </summary>
public string Label { get; private set; }
public string Label { get; }

private const int BytesPerLine = 16;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ public HttpResponseException(string message, HttpResponseMessage response) : bas
/// <summary>
/// HTTP error response.
/// </summary>
public HttpResponseMessage Response { get; private set; }
public HttpResponseMessage Response { get; }
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ public class FormObject
/// <summary>
/// Gets or private sets the Id property.
/// </summary>
public string Id { get; private set; }
public string Id { get; }

/// <summary>
/// Gets or private sets the Method property.
/// </summary>
public string Method { get; private set; }
public string Method { get; }

/// <summary>
/// Gets or private sets the Action property.
/// </summary>
public string Action { get; private set; }
public string Action { get; }

/// <summary>
/// Gets or private sets the Fields property.
/// </summary>
public Dictionary<string, string> Fields { get; private set; }
public Dictionary<string, string> Fields { get; }

/// <summary>
/// Constructor for FormObject.
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.PowerShell.MarkdownRender/VT100Renderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ public VT100Renderer(TextWriter writer, PSMarkdownOptionInfo optionInfo) : base(
/// <summary>
/// Gets the current escape sequences.
/// </summary>
public VT100EscapeSequences EscapeSequences { get; private set; }
public VT100EscapeSequences EscapeSequences { get; }
}
}
Loading