Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add WSMan path separator property
Remove invalid test cases for nonwindows os
  • Loading branch information
Rene Hernandez committed Mar 29, 2019
commit cb175f614fc7b03099be8a847bae8b850bec62dc
29 changes: 29 additions & 0 deletions src/Microsoft.WSMan.Management/ConfigProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,35 @@ string ICmdletProviderSupportsHelp.GetHelpMaml(string helpItemName, string path)

#endregion

#region CmdletProvider overrides

/// <summary>
/// Starts the Registry provider. It sets the PathSeparator property.
/// </summary>
/// <param name="providerInfo">
/// The ProviderInfo object that holds the provider's configuration.
/// </param>
/// <returns>
/// The updated ProviderInfo object that holds the provider's configuration.
/// </returns>
protected override ProviderInfo Start(ProviderInfo providerInfo)
{
if (providerInfo != null)
{
providerInfo.PathSeparator = new ReadOnlyCollection<string>(
new List<string>
{
WSManStringLiterals.DefaultPathSeparator.ToString(),
WSManStringLiterals.AlternatePathSeparator.ToString()
});
}

return providerInfo;
}

#endregion


#region DriveCmdletProvider
/// <summary>
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ public override string ToString()
/// <returns>
/// Read-only collection of strings representing the path separators characters for this provider.
/// </returns>
public ReadOnlyCollection<string> PathSeparator { get; internal set; } = new ReadOnlyCollection<string>(new List<string>());
public ReadOnlyCollection<string> PathSeparator { get; set; } = new ReadOnlyCollection<string>(new List<string>());
Comment thread
renehernandez marked this conversation as resolved.
Outdated

/// <summary>
/// Constructs an instance of the class using an existing reference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ Describe "Get-PSProvider" -Tags "CI" {
@{Provider = 'Function'; Value = @("/", "\")}
@{Provider = 'Alias'; Value = @("/", "\")}
@{Provider = 'Environment'; Value = @("/", "\")}
@{Provider = 'Certificate'; Value = @("/", "\")}
)
}
Comment thread
renehernandez marked this conversation as resolved.
Outdated
}
Expand Down