Skip to content

Commit 4ab1b90

Browse files
authored
1 parent bbe46f2 commit 4ab1b90

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/Microsoft.PowerShell.Commands.Diagnostics/GetEventCommand.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,7 @@ private string BuildStructuredQueryFromHashTable(EventLogSession eventLogSession
13461346
// HandleEventIdHashValue helper for hashtable structured query builder.
13471347
// Constructs and returns EventId XPath portion as a string.
13481348
//
1349-
private string HandleEventIdHashValue(object value)
1349+
private static string HandleEventIdHashValue(object value)
13501350
{
13511351
StringBuilder ret = new();
13521352
Array idsArray = value as Array;
@@ -1376,7 +1376,7 @@ private string HandleEventIdHashValue(object value)
13761376
// HandleLevelHashValue helper for hashtable structured query builder.
13771377
// Constructs and returns Level XPath portion as a string.
13781378
//
1379-
private string HandleLevelHashValue(object value)
1379+
private static string HandleLevelHashValue(object value)
13801380
{
13811381
StringBuilder ret = new();
13821382
Array levelsArray = value as Array;
@@ -1564,7 +1564,7 @@ private string HandleEndTimeHashValue(object value, Hashtable hash)
15641564
// HandleDataHashValue helper for hashtable structured query builder.
15651565
// Constructs and returns EventData/Data XPath portion as a string.
15661566
//
1567-
private string HandleDataHashValue(object value)
1567+
private static string HandleDataHashValue(object value)
15681568
{
15691569
StringBuilder ret = new();
15701570
Array dataArray = value as Array;
@@ -1595,7 +1595,7 @@ private string HandleDataHashValue(object value)
15951595
// Constructs and returns named event data field XPath portion as a string.
15961596
// Fix Issue #2327
15971597
//
1598-
private string HandleNamedDataHashValue(string key, object value)
1598+
private static string HandleNamedDataHashValue(string key, object value)
15991599
{
16001600
StringBuilder ret = new();
16011601
Array dataArray = value as Array;
@@ -1909,7 +1909,7 @@ private string AddProviderPredicatesToFilter(StringCollection providers)
19091909
// "System/Provider[@Name='a' or @Name='b']"
19101910
// for all provider names specified in the "providers" argument.
19111911
//
1912-
private string BuildProvidersPredicate(StringCollection providers)
1912+
private static string BuildProvidersPredicate(StringCollection providers)
19131913
{
19141914
if (providers.Count == 0)
19151915
{

src/Microsoft.PowerShell.Commands.Diagnostics/PdhHelper.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ public void Dispose()
429429
/// <param name="strNative"></param>
430430
/// <param name="strSize"></param>
431431
/// <param name="strColl"></param>
432-
private void ReadPdhMultiString(ref IntPtr strNative, Int32 strSize, ref StringCollection strColl)
432+
private static void ReadPdhMultiString(ref IntPtr strNative, Int32 strSize, ref StringCollection strColl)
433433
{
434434
Debug.Assert(strSize >= 2);
435435
int offset = 0;
@@ -452,7 +452,7 @@ private void ReadPdhMultiString(ref IntPtr strNative, Int32 strSize, ref StringC
452452
strColl.AddRange(allSubstringsWithNulls.Split('\0'));
453453
}
454454

455-
private uint GetCounterInfoPlus(IntPtr hCounter, out UInt32 counterType, out UInt32 defaultScale, out UInt64 timeBase)
455+
private static uint GetCounterInfoPlus(IntPtr hCounter, out UInt32 counterType, out UInt32 defaultScale, out UInt64 timeBase)
456456
{
457457
counterType = 0;
458458
defaultScale = 0;
@@ -824,7 +824,7 @@ public bool IsPathValid(string path)
824824
return (PdhValidatePathEx(_hDataSource, path) == PdhResults.PDH_CSTATUS_VALID_DATA);
825825
}
826826

827-
private uint MakePath(PDH_COUNTER_PATH_ELEMENTS pathElts, out string outPath, bool bWildcardInstances)
827+
private static uint MakePath(PDH_COUNTER_PATH_ELEMENTS pathElts, out string outPath, bool bWildcardInstances)
828828
{
829829
outPath = string.Empty;
830830
IntPtr pPathBufferSize = new(0);
@@ -861,7 +861,7 @@ private uint MakePath(PDH_COUNTER_PATH_ELEMENTS pathElts, out string outPath, bo
861861
return res;
862862
}
863863

864-
private uint MakeAllInstancePath(string origPath, out string unifiedPath)
864+
private static uint MakeAllInstancePath(string origPath, out string unifiedPath)
865865
{
866866
unifiedPath = origPath;
867867

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

879-
private uint ParsePath(string fullPath, ref PDH_COUNTER_PATH_ELEMENTS pCounterPathElements)
879+
private static uint ParsePath(string fullPath, ref PDH_COUNTER_PATH_ELEMENTS pCounterPathElements)
880880
{
881881
IntPtr bufSize = new(0);
882882

0 commit comments

Comments
 (0)