diff --git a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimAsyncOperation.cs b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimAsyncOperation.cs
index e721735afc6..b7e418e05b6 100644
--- a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimAsyncOperation.cs
+++ b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimAsyncOperation.cs
@@ -6,9 +6,9 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
+using System.Globalization;
using System.Management.Automation;
using System.Threading;
-using System.Globalization;
#endregion
@@ -81,14 +81,14 @@ protected void NewCmdletActionHandler(object cimSession, CmdletActionEventArgs a
///
///
///
- /// object raised the event
+ /// object raised the event.
///
/// Event argument.
protected void OperationCreatedHandler(object cimSession, OperationEventArgs actionArgs)
{
DebugHelper.WriteLogEx();
- lock (this.myLock)
+ lock (this.a_lock)
{
this.operationCount++;
}
@@ -101,14 +101,14 @@ protected void OperationCreatedHandler(object cimSession, OperationEventArgs act
///
///
///
- /// object raised the event
+ /// object raised the event.
///
/// Event argument.
protected void OperationDeletedHandler(object cimSession, OperationEventArgs actionArgs)
{
DebugHelper.WriteLogEx();
- lock (this.myLock)
+ lock (this.a_lock)
{
this.operationCount--;
if (this.operationCount == 0)
@@ -126,7 +126,7 @@ protected void OperationDeletedHandler(object cimSession, OperationEventArgs act
///
///
///
- /// wrapper of cmdlet, for details
+ /// wrapper of cmdlet, for details.
///
public void ProcessActions(CmdletOperationBase cmdletOperation)
{
@@ -147,11 +147,11 @@ public void ProcessActions(CmdletOperationBase cmdletOperation)
///
///
/// process remaining actions until all operations are completed or
- /// current cmdlet is terminated by user
+ /// current cmdlet is terminated by user.
///
///
///
- /// wrapper of cmdlet, for details
+ /// wrapper of cmdlet, for details.
///
public void ProcessRemainActions(CmdletOperationBase cmdletOperation)
{
@@ -187,7 +187,7 @@ public void ProcessRemainActions(CmdletOperationBase cmdletOperation)
///
///
- /// Get action object from action queue
+ /// Get action object from action queue.
///
///
/// Next action to execute.
@@ -296,8 +296,7 @@ protected CimSessionProxy CreateCimSessionProxy(string computerName)
///
///
///
- protected CimSessionProxy CreateCimSessionProxy(string computerName,
- CimInstance cimInstance)
+ protected CimSessionProxy CreateCimSessionProxy(string computerName, CimInstance cimInstance)
{
CimSessionProxy proxy = new CimSessionProxy(computerName, cimInstance);
this.SubscribeEventAndAddProxytoCache(proxy);
@@ -445,7 +444,7 @@ protected bool Disposed
{
get
{
- return (Interlocked.Read(ref this._disposed) == 1);
+ return Interlocked.Read(ref this._disposed) == 1;
}
}
@@ -461,6 +460,7 @@ protected bool Disposed
public void Dispose()
{
Dispose(true);
+
// This object will be cleaned up by the Dispose method.
// Therefore, you should call GC.SuppressFinalize to
// take this object off the finalization queue
@@ -525,6 +525,7 @@ private void Cleanup()
temporaryProxy = new List(this.cimSessionProxyCache);
this.cimSessionProxyCache.Clear();
}
+
// clean up all proxy objects
foreach (CimSessionProxy proxy in temporaryProxy)
{
@@ -549,12 +550,12 @@ private void Cleanup()
///
/// Lock object.
///
- private readonly object myLock = new object();
+ private readonly object a_lock = new object();
///
/// Number of active operations.
///
- private UInt32 operationCount = 0;
+ private uint operationCount;
///
/// Event to notify ps thread that more action is available.
@@ -594,6 +595,5 @@ private void Cleanup()
internal const string ComputerNameArgument = @"ComputerName";
internal const string CimSessionArgument = @"CimSession";
#endregion
-
}
}