Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 5 additions & 5 deletions src/Microsoft.PowerShell.Commands.Diagnostics/GetEventCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,7 @@ private string BuildStructuredQueryFromHashTable(EventLogSession eventLogSession
// HandleEventIdHashValue helper for hashtable structured query builder.
// Constructs and returns EventId XPath portion as a string.
//
private string HandleEventIdHashValue(object value)
private static string HandleEventIdHashValue(object value)
{
StringBuilder ret = new StringBuilder();
Array idsArray = value as Array;
Expand Down Expand Up @@ -1376,7 +1376,7 @@ private string HandleEventIdHashValue(object value)
// HandleLevelHashValue helper for hashtable structured query builder.
// Constructs and returns Level XPath portion as a string.
//
private string HandleLevelHashValue(object value)
private static string HandleLevelHashValue(object value)
{
StringBuilder ret = new StringBuilder();
Array levelsArray = value as Array;
Expand Down Expand Up @@ -1564,7 +1564,7 @@ private string HandleEndTimeHashValue(object value, Hashtable hash)
// HandleDataHashValue helper for hashtable structured query builder.
// Constructs and returns EventData/Data XPath portion as a string.
//
private string HandleDataHashValue(object value)
private static string HandleDataHashValue(object value)
{
StringBuilder ret = new StringBuilder();
Array dataArray = value as Array;
Expand Down Expand Up @@ -1595,7 +1595,7 @@ private string HandleDataHashValue(object value)
// Constructs and returns named event data field XPath portion as a string.
// Fix Issue #2327
//
private string HandleNamedDataHashValue(string key, object value)
private static string HandleNamedDataHashValue(string key, object value)
{
StringBuilder ret = new StringBuilder();
Array dataArray = value as Array;
Expand Down Expand Up @@ -1909,7 +1909,7 @@ private string AddProviderPredicatesToFilter(StringCollection providers)
// "System/Provider[@Name='a' or @Name='b']"
// for all provider names specified in the "providers" argument.
//
private string BuildProvidersPredicate(StringCollection providers)
private static string BuildProvidersPredicate(StringCollection providers)
{
if (providers.Count == 0)
{
Expand Down
10 changes: 5 additions & 5 deletions src/Microsoft.PowerShell.Commands.Diagnostics/PdhHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ public void Dispose()
/// <param name="strNative"></param>
/// <param name="strSize"></param>
/// <param name="strColl"></param>
private void ReadPdhMultiString(ref IntPtr strNative, Int32 strSize, ref StringCollection strColl)
private static void ReadPdhMultiString(ref IntPtr strNative, Int32 strSize, ref StringCollection strColl)
{
Debug.Assert(strSize >= 2);
int offset = 0;
Expand All @@ -452,7 +452,7 @@ private void ReadPdhMultiString(ref IntPtr strNative, Int32 strSize, ref StringC
strColl.AddRange(allSubstringsWithNulls.Split('\0'));
}

private uint GetCounterInfoPlus(IntPtr hCounter, out UInt32 counterType, out UInt32 defaultScale, out UInt64 timeBase)
private static uint GetCounterInfoPlus(IntPtr hCounter, out UInt32 counterType, out UInt32 defaultScale, out UInt64 timeBase)
{
counterType = 0;
defaultScale = 0;
Expand Down Expand Up @@ -824,7 +824,7 @@ public bool IsPathValid(string path)
return (PdhValidatePathEx(_hDataSource, path) == PdhResults.PDH_CSTATUS_VALID_DATA);
}

private uint MakePath(PDH_COUNTER_PATH_ELEMENTS pathElts, out string outPath, bool bWildcardInstances)
private static uint MakePath(PDH_COUNTER_PATH_ELEMENTS pathElts, out string outPath, bool bWildcardInstances)
{
outPath = string.Empty;
IntPtr pPathBufferSize = new IntPtr(0);
Expand Down Expand Up @@ -861,7 +861,7 @@ private uint MakePath(PDH_COUNTER_PATH_ELEMENTS pathElts, out string outPath, bo
return res;
}

private uint MakeAllInstancePath(string origPath, out string unifiedPath)
private static uint MakeAllInstancePath(string origPath, out string unifiedPath)
{
unifiedPath = origPath;

Expand All @@ -876,7 +876,7 @@ private uint MakeAllInstancePath(string origPath, out string unifiedPath)
return MakePath(elts, out unifiedPath, true);
}

private uint ParsePath(string fullPath, ref PDH_COUNTER_PATH_ELEMENTS pCounterPathElements)
private static uint ParsePath(string fullPath, ref PDH_COUNTER_PATH_ELEMENTS pCounterPathElements)
{
IntPtr bufSize = new IntPtr(0);

Expand Down