Update files from Source Depot changeset [SD:715912]

Corresponds to 77eda782aa78ba8b7a36c51ee619629ce6c990f2 in psl-monad.
This commit is contained in:
PowerShell Team authored and Andrew Schwartzmeyer committed 2016-06-15 18:02:03 -07:00
1 parent d9b11669ce
commit 8ee6d6ca43
74 files changed
+1376 -1336

No files matched your search

@@ -347,7 +347,7 @@ namespace Microsoft.PowerShell.Commands
string activeExtension = null;
foreach (string path in resolvedPaths)
{
string currentExtension = System.IO.Path.GetExtension(path).ToUpper();
string currentExtension = System.IO.Path.GetExtension(path).ToUpperInvariant();
switch (currentExtension)
{
@@ -1063,10 +1063,20 @@ namespace Microsoft.PowerShell.Commands
private static PortableExecutableReference ObjectDeclaredAssemblyReference =
MetadataReference.CreateFromFile(ClrFacade.GetAssemblies(typeof(object).FullName).First().Location);
// CoreCLR RC2 bits don't have SecureString. We are using a separate assembly with SecureString implementation.
// This fact is an implementation detail and should not require the user to specify one more assembly,
// if they want to use SecureString in Add-Type -TypeDefinition.
// So this assembly should be in the default assemblies list to provide the best experience.
//
// TODO: This reference should be removed, if we take CoreCLR version that has SecureString implementation.
private static PortableExecutableReference SecureStringAssemblyReference =
MetadataReference.CreateFromFile(typeof(System.Security.SecureString).GetTypeInfo().Assembly.Location);
private static MetadataReference[] defaultAssemblies = new MetadataReference[]
{
ObjectImplementationAssemblyReference,
ObjectDeclaredAssemblyReference,
SecureStringAssemblyReference,
MetadataReference.CreateFromFile(typeof(PSObject).GetTypeInfo().Assembly.Location)
};
@@ -1210,6 +1220,7 @@ namespace Microsoft.PowerShell.Commands
var tempReferences = ReferencedAssemblies.Select(a => MetadataReference.CreateFromFile(ResolveReferencedAssembly(a))).ToList();
tempReferences.Add(ObjectImplementationAssemblyReference);
tempReferences.Add(ObjectDeclaredAssemblyReference);
tempReferences.Add(SecureStringAssemblyReference);
references = tempReferences.ToArray();
}
@@ -2526,7 +2526,7 @@ function Get-PSImplicitRemotingSession
)
";
// index 0 - "-ContainerId <container id>" (ContainerId is used instead of ContainerName due to its uniqueness)
// index 0 - "-ContainerId <container id>"
// index 1 - "-RunAsAdministrator" or empty string
// index 2 - "-ConfigurationName <configuration name>" or empty string
private const string NewContainerRunspaceTemplate = @"
@@ -83,6 +83,7 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// set the date
/// </summary>
[ArchitectureSensitive]
protected override void ProcessRecord()
{
DateTime dateToUse;
@@ -171,4 +171,7 @@
<data name="CouldNotParseAsPowerShellDataFile" xml:space="preserve">
<value>The file '{0}' could not be parsed as a PowerShell Data File.</value>
</data>
<data name="TypeNotSupported" xml:space="preserve">
<value>'{0}' is not supported in this system.</value>
</data>
</root>