qol: inline variable declaration

This commit is contained in:
Gary Sharp
2025-07-20 15:12:33 +10:00
parent 5792771ea1
commit 1add4ee0f5
89 changed files with 1229 additions and 1512 deletions
@@ -76,10 +76,9 @@ namespace Disco.Services.Devices.ManagedGroups
public static bool TryGetManagedGroup(DeviceBatch DeviceBatch, out DeviceBatchAssignedUsersManagedGroup ManagedGroup)
{
ADManagedGroup managedGroup;
string key = GetKey(DeviceBatch);
if (ActiveDirectory.Context.ManagedGroups.TryGetValue(key, out managedGroup))
if (ActiveDirectory.Context.ManagedGroups.TryGetValue(key, out var managedGroup))
{
ManagedGroup = (DeviceBatchAssignedUsersManagedGroup)managedGroup;
return true;
@@ -74,10 +74,9 @@ namespace Disco.Services.Devices.ManagedGroups
public static bool TryGetManagedGroup(DeviceBatch DeviceBatch, out DeviceBatchDevicesManagedGroup ManagedGroup)
{
ADManagedGroup managedGroup;
string key = GetKey(DeviceBatch);
if (ActiveDirectory.Context.ManagedGroups.TryGetValue(key, out managedGroup))
if (ActiveDirectory.Context.ManagedGroups.TryGetValue(key, out var managedGroup))
{
ManagedGroup = (DeviceBatchDevicesManagedGroup)managedGroup;
return true;
@@ -76,10 +76,9 @@ namespace Disco.Services.Devices.ManagedGroups
public static bool TryGetManagedGroup(DeviceProfile DeviceProfile, out DeviceProfileAssignedUsersManagedGroup ManagedGroup)
{
ADManagedGroup managedGroup;
string key = GetKey(DeviceProfile);
if (ActiveDirectory.Context.ManagedGroups.TryGetValue(key, out managedGroup))
if (ActiveDirectory.Context.ManagedGroups.TryGetValue(key, out var managedGroup))
{
ManagedGroup = (DeviceProfileAssignedUsersManagedGroup)managedGroup;
return true;
@@ -75,10 +75,9 @@ namespace Disco.Services.Devices.ManagedGroups
public static bool TryGetManagedGroup(DeviceProfile DeviceProfile, out DeviceProfileDevicesManagedGroup ManagedGroup)
{
ADManagedGroup managedGroup;
string key = GetKey(DeviceProfile);
if (ActiveDirectory.Context.ManagedGroups.TryGetValue(key, out managedGroup))
if (ActiveDirectory.Context.ManagedGroups.TryGetValue(key, out var managedGroup))
{
ManagedGroup = (DeviceProfileDevicesManagedGroup)managedGroup;
return true;