Use 'var' for local variables in AcWebSignalRHubBase
Replaced explicit 'int' declarations with 'var' for local variables in for loops and variable initializations. This improves code conciseness and maintains consistency without altering functionality.
This commit is contained in:
parent
d35c7bd066
commit
a2f392a247
|
|
@ -114,8 +114,8 @@ public abstract class AcWebSignalRHubBase<TSignalRTags, TLogger>(IConfiguration
|
|||
private static (uint value, int bytesRead) ReadVarUIntFromBytes(byte[] data, int startPos)
|
||||
{
|
||||
uint value = 0;
|
||||
int shift = 0;
|
||||
int bytesRead = 0;
|
||||
var shift = 0;
|
||||
var bytesRead = 0;
|
||||
|
||||
while (startPos + bytesRead < data.Length)
|
||||
{
|
||||
|
|
@ -205,7 +205,7 @@ public abstract class AcWebSignalRHubBase<TSignalRTags, TLogger>(IConfiguration
|
|||
|
||||
// Log in declaration order (not alphabetically)
|
||||
Logger.Info($"{prefix} Property Count: {props.Length}");
|
||||
for (int i = 0; i < props.Length; i++)
|
||||
for (var i = 0; i < props.Length; i++)
|
||||
{
|
||||
var p = props[i];
|
||||
var declaringType = p.DeclaringType?.Name ?? "?";
|
||||
|
|
@ -240,7 +240,7 @@ public abstract class AcWebSignalRHubBase<TSignalRTags, TLogger>(IConfiguration
|
|||
|
||||
Logger.Info($"Header property count: {propCount}");
|
||||
|
||||
for (int i = 0; i < (int)propCount && pos < responseData.Length; i++)
|
||||
for (var i = 0; i < (int)propCount && pos < responseData.Length; i++)
|
||||
{
|
||||
// Read string length as VarUInt
|
||||
var (strLen, strLenBytes) = ReadVarUIntFromBytes(responseData, pos);
|
||||
|
|
|
|||
Loading…
Reference in New Issue