spelling: locals in src/System.Management.Automation/engine/Modules

This commit is contained in:
Josh Soref 2016-09-01 14:47:07 +00:00
parent ca440b92e5
commit c724220af1
3 changed files with 25 additions and 25 deletions

View file

@ -123,17 +123,17 @@ namespace System.Management.Automation
var hadFunctions = AddPsd1EntryToResult(result, moduleManifestProperties["FunctionsToExport"], CommandTypes.Function, ref sawWildcard);
var hadAliases = AddPsd1EntryToResult(result, moduleManifestProperties["AliasesToExport"], CommandTypes.Alias, ref sawWildcard);
var analysisSuceeded = hadCmdlets && hadFunctions && hadAliases;
var analysisSucceeded = hadCmdlets && hadFunctions && hadAliases;
if (!analysisSuceeded && !sawWildcard && (hadCmdlets || hadFunctions))
if (!analysisSucceeded && !sawWildcard && (hadCmdlets || hadFunctions))
{
// If we're missing CmdletsToExport, that might still be OK, but only if we have a script module.
// Likewise, if we're missing FunctionsToExport, that might be OK, but only if we have a binary module.
analysisSuceeded = !CheckModulesTypesInManifestAgainstExportedCommands(moduleManifestProperties, hadCmdlets, hadFunctions, hadAliases);
analysisSucceeded = !CheckModulesTypesInManifestAgainstExportedCommands(moduleManifestProperties, hadCmdlets, hadFunctions, hadAliases);
}
if (analysisSuceeded)
if (analysisSucceeded)
{
var moduleCacheEntry = new ModuleCacheEntry
{

View file

@ -762,12 +762,12 @@ namespace Microsoft.PowerShell.Commands
Version version;
if (Version.TryParse(subdirName, out version))
{
var modueBaseWithoutVersion = Path.GetDirectoryName(tempModuleInfoFromVerification.ModuleBase);
var moduleBaseWithoutVersion = Path.GetDirectoryName(tempModuleInfoFromVerification.ModuleBase);
modulePath = new string[]
{
Path.GetDirectoryName(modueBaseWithoutVersion),
modueBaseWithoutVersion
Path.GetDirectoryName(moduleBaseWithoutVersion),
moduleBaseWithoutVersion
};
}
else
@ -1874,24 +1874,24 @@ namespace Microsoft.PowerShell.Commands
}
// Test the required processor architecture
ProcessorArchitecture requiredProcesorArchitecture;
ProcessorArchitecture requiredProcessorArchitecture;
if (
!GetScalarFromData(data, moduleManifestPath, "ProcessorArchitecture", manifestProcessingFlags,
out requiredProcesorArchitecture))
out requiredProcessorArchitecture))
{
containedErrors = true;
if (bailOnFirstError) return null;
}
else if ((requiredProcesorArchitecture != ProcessorArchitecture.None) &&
(requiredProcesorArchitecture != ProcessorArchitecture.MSIL))
else if ((requiredProcessorArchitecture != ProcessorArchitecture.None) &&
(requiredProcessorArchitecture != ProcessorArchitecture.MSIL))
{
bool isRunningOnArm = false;
ProcessorArchitecture currentArchitecture = PsUtils.GetProcessorArchitecture(out isRunningOnArm);
// For ARM Architectures, we need to do additional string-level comparison
if ((currentArchitecture != requiredProcesorArchitecture && !isRunningOnArm) ||
if ((currentArchitecture != requiredProcessorArchitecture && !isRunningOnArm) ||
(isRunningOnArm &&
!requiredProcesorArchitecture.ToString()
!requiredProcessorArchitecture.ToString()
.Equals(PsUtils.ArmArchitecture, StringComparison.OrdinalIgnoreCase)))
{
containedErrors = true;
@ -1901,7 +1901,7 @@ namespace Microsoft.PowerShell.Commands
? PsUtils.ArmArchitecture
: currentArchitecture.ToString();
message = StringUtil.Format(Modules.InvalidProcessorArchitecture,
actualCurrentArchitecture, moduleManifestPath, requiredProcesorArchitecture);
actualCurrentArchitecture, moduleManifestPath, requiredProcessorArchitecture);
InvalidOperationException ioe = new InvalidOperationException(message);
ErrorRecord er = new ErrorRecord(ioe, "Modules_InvalidProcessorArchitecture",
ErrorCategory.ResourceUnavailable, moduleManifestPath);
@ -2527,7 +2527,7 @@ namespace Microsoft.PowerShell.Commands
manifestInfo.PowerShellHostName = requestedHostName;
manifestInfo.PowerShellHostVersion = requestedHostVersion;
manifestInfo.PowerShellVersion = powerShellVersion;
manifestInfo.ProcessorArchitecture = requiredProcesorArchitecture;
manifestInfo.ProcessorArchitecture = requiredProcessorArchitecture;
manifestInfo.Prefix = resolvedCommandPrefix;
if (assemblyList != null)
{
@ -2540,8 +2540,8 @@ namespace Microsoft.PowerShell.Commands
{
foreach (var f in fileList)
{
string absuluteFilePath = GetAbsolutePath(moduleBase, f);
manifestInfo.AddToFileList(absuluteFilePath);
string absoluteFilePath = GetAbsolutePath(moduleBase, f);
manifestInfo.AddToFileList(absoluteFilePath);
}
}
if (moduleList != null)
@ -2892,7 +2892,7 @@ namespace Microsoft.PowerShell.Commands
null, //SessionState
nestedModuleOptions,
manifestProcessingFlags,
false, // addToParentModueIfFound
false, // addToParentModuleIfFound
out found);
}
else
@ -3303,7 +3303,7 @@ namespace Microsoft.PowerShell.Commands
if (newManifestInfo.ProcessorArchitecture == ProcessorArchitecture.None)
{
newManifestInfo.ProcessorArchitecture = requiredProcesorArchitecture;
newManifestInfo.ProcessorArchitecture = requiredProcessorArchitecture;
}
if (newManifestInfo.RequiredAssemblies == null || newManifestInfo.RequiredAssemblies.LongCount() == 0)
@ -3627,7 +3627,7 @@ namespace Microsoft.PowerShell.Commands
private readonly string _serviceCoreAssemblyFullName = "Microsoft.Powershell.Workflow.ServiceCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL";
private readonly string _serviceCoreAssemblyShortName = "Microsoft.Powershell.Workflow.ServiceCore";
private PSModuleInfo LoadServiceCoreModule(PSModuleInfo parentModule, string moduleBase, SessionState ss, ImportModuleOptions nestedModuleOptions, ManifestProcessingFlags manifestProcessingFlags, bool addToParentModueIfFound, out bool found)
private PSModuleInfo LoadServiceCoreModule(PSModuleInfo parentModule, string moduleBase, SessionState ss, ImportModuleOptions nestedModuleOptions, ManifestProcessingFlags manifestProcessingFlags, bool addToParentModuleIfFound, out bool found)
{
SessionStateInternal oldSessionState = Context.EngineSessionState;
@ -3663,7 +3663,7 @@ namespace Microsoft.PowerShell.Commands
// If found, add it to the parent's list of NestedModules
if (found)
{
if (addToParentModueIfFound)
if (addToParentModuleIfFound)
{
parentModule.AddNestedModule(nestedModule);
}

View file

@ -881,9 +881,9 @@ namespace Microsoft.PowerShell.Commands
_exportedCmdlets = new string[] { "*" };
}
ValidateUriParamterValue(ProjectUri, "ProjectUri");
ValidateUriParamterValue(LicenseUri, "LicenseUri");
ValidateUriParamterValue(IconUri, "IconUri");
ValidateUriParameterValue(ProjectUri, "ProjectUri");
ValidateUriParameterValue(LicenseUri, "LicenseUri");
ValidateUriParameterValue(IconUri, "IconUri");
if (CompatiblePSEditions != null && (CompatiblePSEditions.Distinct(StringComparer.OrdinalIgnoreCase).Count() != CompatiblePSEditions.Count()))
{
@ -1131,7 +1131,7 @@ namespace Microsoft.PowerShell.Commands
}
}
private void ValidateUriParamterValue(Uri uri, string parameterName)
private void ValidateUriParameterValue(Uri uri, string parameterName)
{
Dbg.Assert(!String.IsNullOrWhiteSpace(parameterName), "parameterName should not be null or whitespace");