Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
6b494be
Update TestService
SteveL-MSFT Dec 23, 2018
f3f173e
Update WebListener
SteveL-MSFT Dec 23, 2018
088dfd2
Update Controllers
SteveL-MSFT Dec 23, 2018
86eb916
Update ExpTest
SteveL-MSFT Dec 23, 2018
b111f3a
Update MyApp
SteveL-MSFT Dec 23, 2018
74dbb95
Update Logic
SteveL-MSFT Dec 23, 2018
59125f2
Update Logic
SteveL-MSFT Dec 23, 2018
4b8c59c
Update MyApp
SteveL-MSFT Dec 23, 2018
21b0033
Update Microsoft.Management.Infrastructure.CimCmdlets
SteveL-MSFT Dec 23, 2018
9e355b6
Update Microsoft.PowerShell.Commands.Diagnostics
SteveL-MSFT Dec 23, 2018
23980ab
Update Microsoft.PowerShell.ScheduledJob
SteveL-MSFT Dec 23, 2018
b4c11be
Update Microsoft.WSMan.Management
SteveL-MSFT Dec 23, 2018
5cc03b5
Update Microsoft.WSMan.Runtime
SteveL-MSFT Dec 23, 2018
f04d6a6
Update ResGen
SteveL-MSFT Dec 23, 2018
f259122
Update TypeCatalogGen
SteveL-MSFT Dec 23, 2018
e1acfae
Update commands
SteveL-MSFT Dec 23, 2018
50bbcf5
Update Eventing
SteveL-MSFT Dec 23, 2018
f1debb2
Update Reader
SteveL-MSFT Dec 23, 2018
a30b813
Update utility
SteveL-MSFT Dec 23, 2018
dca7f25
Update ShowCommand
SteveL-MSFT Dec 23, 2018
c01083f
Update trace
SteveL-MSFT Dec 23, 2018
cd6b0dd
Update WebCmdlet
SteveL-MSFT Dec 23, 2018
eac7fd7
Update Common
SteveL-MSFT Dec 23, 2018
36dfd2a
Update CoreCLR
SteveL-MSFT Dec 23, 2018
252a4ff
Update common
SteveL-MSFT Dec 23, 2018
eb1c189
Update format-object
SteveL-MSFT Dec 23, 2018
be5470e
Update format-wide
SteveL-MSFT Dec 23, 2018
7e6d86e
Update out-file
SteveL-MSFT Dec 23, 2018
1396ccc
Update out-printer
SteveL-MSFT Dec 23, 2018
4d38fe4
Update out-string
SteveL-MSFT Dec 23, 2018
172b9d4
Update OutGridView
SteveL-MSFT Dec 23, 2018
adb671c
Update LocalAccounts
SteveL-MSFT Dec 23, 2018
6bfbb71
Update Commands
SteveL-MSFT Dec 23, 2018
b2764e1
Update security
SteveL-MSFT Dec 23, 2018
b623a99
Update CoreCLR
SteveL-MSFT Dec 23, 2018
b202357
Update DscSupport
SteveL-MSFT Dec 23, 2018
b26a424
Update engine
SteveL-MSFT Dec 23, 2018
1e2d9bc
Update help
SteveL-MSFT Dec 23, 2018
3dba527
Update logging
SteveL-MSFT Dec 23, 2018
bcdf012
Update namespaces
SteveL-MSFT Dec 23, 2018
5373827
Update security
SteveL-MSFT Dec 23, 2018
9700c82
Update utils
SteveL-MSFT Dec 23, 2018
b1f591c
Update config
SteveL-MSFT Dec 23, 2018
dc93992
Update perfCounters
SteveL-MSFT Dec 23, 2018
561eca1
Update tracing
SteveL-MSFT Dec 23, 2018
03810a1
Update cmdletization
SteveL-MSFT Dec 23, 2018
823c057
Update other
SteveL-MSFT Dec 23, 2018
4c49c90
Update cim
SteveL-MSFT Dec 23, 2018
50d5500
Update xml
SteveL-MSFT Dec 23, 2018
15aed9d
Update CoreCLR
SteveL-MSFT Dec 23, 2018
24ecf77
Update common
SteveL-MSFT Dec 23, 2018
67324c1
Update DefaultFormatters
SteveL-MSFT Dec 23, 2018
e7feed4
Update out-console
SteveL-MSFT Dec 23, 2018
2d72227
Update out-textInterface
SteveL-MSFT Dec 23, 2018
8baf40d
Update DisplayDatabase
SteveL-MSFT Dec 23, 2018
f5f05d8
Update Utilities
SteveL-MSFT Dec 23, 2018
0e3a4c7
Update COM
SteveL-MSFT Dec 23, 2018
1124422
Update ComInterop
SteveL-MSFT Dec 23, 2018
3e07f3b
Update CommandCompletion
SteveL-MSFT Dec 23, 2018
bf321a9
Update debugger
SteveL-MSFT Dec 23, 2018
dea69ad
Update ExperimentalFeature
SteveL-MSFT Dec 23, 2018
8758eea
Update hostifaces
SteveL-MSFT Dec 23, 2018
60debb2
Update interpreter
SteveL-MSFT Dec 23, 2018
dcada5a
Update lang
SteveL-MSFT Dec 23, 2018
b8d58f2
Update Modules
SteveL-MSFT Dec 23, 2018
54b1877
Update parser
SteveL-MSFT Dec 23, 2018
6a091e4
Update runtime
SteveL-MSFT Dec 23, 2018
8c3b80f
Update client
SteveL-MSFT Dec 23, 2018
55aa650
Update commands
SteveL-MSFT Dec 23, 2018
aee1aac
Update common
SteveL-MSFT Dec 23, 2018
f8e0e30
Update fanin
SteveL-MSFT Dec 23, 2018
60349b6
Update server
SteveL-MSFT Dec 23, 2018
1755105
Update WireDataFormat
SteveL-MSFT Dec 23, 2018
e91c119
Update Binding
SteveL-MSFT Dec 23, 2018
936ddc6
Update Operations
SteveL-MSFT Dec 23, 2018
e57479e
Update interface
SteveL-MSFT Dec 23, 2018
c1d5181
Update cmdletization
SteveL-MSFT Dec 23, 2018
41fcf7e
Update cim
SteveL-MSFT Dec 23, 2018
243eef1
Update management
SteveL-MSFT Dec 23, 2018
ee8d71e
Update WindowsTaskbarJumpList
SteveL-MSFT Dec 23, 2018
c8d7f98
Update msh
SteveL-MSFT Dec 23, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public static int Start(string[] args)
Console.WriteLine(result.ToString());
}
}

return 0;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public static int Main(string[] args)
var results = ps.AddScript("Get-Command Write-Output").Invoke();
Console.WriteLine(results[0].ToString());
}

return 0;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public static int Start(string[] args)
Console.WriteLine(result.ToString());
}
}

return 0;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public static int Main(string[] args)
Console.WriteLine(result.ToString());
}
}

return 0;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ protected void NewCmdletActionHandler(object cimSession, CmdletActionEventArgs a
// unblock the thread waiting for response
(actionArgs.Action as CimSyncAction).OnComplete();
}

return;
}

Expand Down Expand Up @@ -164,6 +165,7 @@ public void ProcessRemainActions(CmdletOperationBase cmdletOperation)
DebugHelper.WriteLogEx("Either disposed or all operations completed.", 2);
break;
}

try
{
this.moreActionEvent.Wait();
Expand All @@ -177,6 +179,7 @@ public void ProcessRemainActions(CmdletOperationBase cmdletOperation)
break;
}
}

ProcessActions(cmdletOperation);
}

Expand Down Expand Up @@ -209,6 +212,7 @@ protected void AddCimSessionProxy(CimSessionProxy sessionproxy)
{
this.cimSessionProxyCache = new List<CimSessionProxy>();
}

if (!this.cimSessionProxyCache.Contains(sessionproxy))
{
this.cimSessionProxyCache.Add(sessionproxy);
Expand Down Expand Up @@ -366,6 +370,7 @@ protected object GetBaseObject(object value)
{
arraybaseObject[i] = GetBaseObject(arrayObject[i]);
}

return arraybaseObject;
}
}
Expand All @@ -390,6 +395,7 @@ protected object GetReferenceOrReferenceArrayObject(object value, ref CimType re
{
return null;
}

referenceType = CimType.Reference;
return cimInstance;
}
Expand All @@ -404,6 +410,7 @@ protected object GetReferenceOrReferenceArrayObject(object value, ref CimType re
{
return null;
}

CimInstance[] cimInstanceArray = new CimInstance[cimReferenceArray.Length];
for (int i = 0; i < cimReferenceArray.Length; i++)
{
Expand All @@ -412,13 +419,15 @@ protected object GetReferenceOrReferenceArrayObject(object value, ref CimType re
{
return null;
}

object baseObject = GetBaseObject(tempCimReference.Value);
cimInstanceArray[i] = baseObject as CimInstance;
if (cimInstanceArray[i] == null)
{
return null;
}
}

referenceType = CimType.ReferenceArray;
return cimInstanceArray;
}
Expand All @@ -439,6 +448,7 @@ protected bool Disposed
return (Interlocked.Read(ref this._disposed) == 1);
}
}

private long _disposed;

/// <summary>
Expand Down Expand Up @@ -506,6 +516,7 @@ private void Cleanup()
(action as CimSyncAction).OnComplete();
}
}

if (this.cimSessionProxyCache != null)
{
List<CimSessionProxy> temporaryProxy;
Expand All @@ -527,6 +538,7 @@ private void Cleanup()
{
this.ackedEvent.Dispose();
}

DebugHelper.WriteLog("Cleanup complete.", 2);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ protected XOperationContextBase Context
{
return this.context;
}

set
{
this.context = value;
}
}

private XOperationContextBase context;
}//End Class

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public void OnImport()
invoker.AddScript(string.Format(CultureInfo.CurrentUICulture, "Set-Alias -Name {0} -Value {1} -Option {2} -ErrorAction SilentlyContinue", alias.Name, alias.Value, alias.Options));
DebugHelper.WriteLog(@"Add commands {0} of {1} with option {2} to current runspace.", 1, alias.Name, alias.Value, alias.Options);
}

System.Collections.ObjectModel.Collection<PSObject> psObjects = invoker.Invoke();
DebugHelper.WriteLog(@"Invoke results {0}.", 1, psObjects.Count);
}
Expand Down Expand Up @@ -77,18 +78,21 @@ internal CimCmdletAliasEntry(string name, string value)
/// The string defining the name of this alias
/// </summary>
internal string Name { get { return this._name; } }

private string _name;

/// <summary>
/// The string defining real cmdlet name
/// </summary>
internal string Value { get { return this._value; } }

private string _value = String.Empty;

/// <summary>
/// The string defining real cmdlet name
/// </summary>
internal ScopedItemOptions Options { get { return this._options; } }

private ScopedItemOptions _options = ScopedItemOptions.AllScope | ScopedItemOptions.ReadOnly;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ internal string ParameterSetName
return this.parameterSetName;
}
}

private readonly string parameterSetName = null;

/// <summary>
Expand All @@ -57,6 +58,7 @@ internal bool IsMandatory
return this.mandatory;
}
}

private readonly bool mandatory = false;
}

Expand Down Expand Up @@ -120,6 +122,7 @@ internal bool IsDefaultParameterSet
return this.isDefaultParameterSet;
}
}

private readonly bool isDefaultParameterSet = false;

/// <summary>
Expand All @@ -132,6 +135,7 @@ internal UInt32 MandatoryParameterCount
return this.mandatoryParameterCount;
}
}

private readonly UInt32 mandatoryParameterCount = 0;

/// <summary>
Expand All @@ -143,11 +147,13 @@ internal bool IsValueSet
{
return this.isValueSet;
}

set
{
this.isValueSet = value;
}
}

private bool isValueSet = false;

/// <summary>
Expand All @@ -159,11 +165,13 @@ internal bool IsValueSetAtBeginProcess
{
return this.isValueSetAtBeginProcess;
}

set
{
this.isValueSetAtBeginProcess = value;
}
}

private bool isValueSetAtBeginProcess = false;

/// <summary>
Expand All @@ -175,11 +183,13 @@ internal UInt32 SetMandatoryParameterCount
{
return this.setMandatoryParameterCount;
}

set
{
this.setMandatoryParameterCount = value;
}
}

private UInt32 setMandatoryParameterCount = 0;

/// <summary>
Expand All @@ -191,11 +201,13 @@ internal UInt32 SetMandatoryParameterCountAtBeginProcess
{
return this.setMandatoryParameterCountAtBeginProcess;
}

set
{
this.setMandatoryParameterCountAtBeginProcess = value;
}
}

private UInt32 setMandatoryParameterCountAtBeginProcess = 0;
}

Expand Down Expand Up @@ -334,8 +346,10 @@ internal void SetParameter(string parameterName, bool isBeginProcess)
{
psEntry.SetMandatoryParameterCountAtBeginProcess++;
}

DebugHelper.WriteLogEx("parameterset name = '{0}'; SetMandatoryParameterCount = '{1}'", 1, parameterDefinitionEntry.ParameterSetName, psEntry.SetMandatoryParameterCount);
}

if (!psEntry.IsValueSet)
{
psEntry.IsValueSet = true;
Expand All @@ -344,8 +358,10 @@ internal void SetParameter(string parameterName, bool isBeginProcess)
psEntry.IsValueSetAtBeginProcess = true;
}
}

nameset.Add(parameterDefinitionEntry.ParameterSetName);
}

this.parametersetNamesList = nameset;
if (isBeginProcess)
{
Expand All @@ -368,13 +384,15 @@ internal void SetParameter(string parameterName, bool isBeginProcess)
{
psEntry.SetMandatoryParameterCountAtBeginProcess++;
}

DebugHelper.WriteLogEx("parameterset name = '{0}'; SetMandatoryParameterCount = '{1}'",
1,
entry.ParameterSetName,
psEntry.SetMandatoryParameterCount);
}
}
}

if (nameset.Count == 0)
{
throw new PSArgumentException(Strings.UnableToResolveParameterSetName);
Expand Down Expand Up @@ -420,19 +438,23 @@ internal string GetParameterSet()
{
defaultParameterSetName = parameterSetName;
}

if (entry.IsValueSet)
{
noMandatoryParameterSet.Add(parameterSetName);
}

continue;
}

if ((entry.SetMandatoryParameterCount == entry.MandatoryParameterCount) &&
this.parametersetNamesList.Contains(parameterSetName))
{
if (boundParameterSetName != null)
{
throw new PSArgumentException(Strings.UnableToResolveParameterSetName);
}

boundParameterSetName = parameterSetName;
}
}
Expand Down Expand Up @@ -462,6 +484,7 @@ internal string GetParameterSet()
{
throw new PSArgumentException(Strings.UnableToResolveParameterSetName);
}

return boundParameterSetName;
}

Expand Down Expand Up @@ -516,6 +539,7 @@ internal void CheckParameterSet()
this.parameterBinder.reset();
}
}

DebugHelper.WriteLog("current parameterset is: " + this.parameterSetName, 4);
}

Expand All @@ -533,6 +557,7 @@ internal void SetParameter(object value, string parameterName)
{
return;
}

if (this.parameterBinder != null)
{
this.parameterBinder.SetParameter(parameterName, this.AtBeginProcess);
Expand Down Expand Up @@ -684,6 +709,7 @@ internal bool AtBeginProcess
{
return this.atBeginProcess;
}

set
{
this.atBeginProcess = value;
Expand All @@ -709,6 +735,7 @@ internal CimAsyncOperation AsyncOperation
this.operation = value;
}
}

get
{
return this.operation;
Expand Down Expand Up @@ -924,8 +951,10 @@ internal void ThrowInvalidProperty(
{
propList.Append(",");
}

propList.Append(property);
}

string message = String.Format(CultureInfo.CurrentUICulture, Strings.CouldNotFindPropertyFromGivenClass,
className, propList);
PSArgumentOutOfRangeException exception = new PSArgumentOutOfRangeException(
Expand Down Expand Up @@ -975,8 +1004,10 @@ internal CimCredential CreateCimCredentials(PSCredential psCredentials,
ThrowInvalidAuthenticationTypeError(operationName, parameterName, passwordAuthentication);
return null;
}

credentials = new CimCredential(impersonatedAuthentication);
}

DebugHelper.WriteLogEx("return credential {0}", 1, credentials);
return credentials;
}
Expand Down
Loading