@@ -731,7 +731,7 @@ private static void Load(ProfileFileInfo profileFileInfo)
731731
732732 if ( loadedProfileUpdated )
733733 LoadedProfileFileChanged ( LoadedProfileFile , true ) ;
734-
734+
735735 // Notify subscribers that profiles have been loaded/updated
736736 ProfilesUpdated ( false ) ;
737737 }
@@ -994,7 +994,7 @@ private static void AddGroups(List<GroupInfo> groups, bool profilesChanged = tru
994994
995995 ProfilesUpdated ( profilesChanged ) ;
996996 }
997-
997+
998998 /// <summary>
999999 /// Method to add a <see cref="GroupInfo" /> to the loaded profile data.
10001000 /// </summary>
@@ -1022,7 +1022,7 @@ public static GroupInfo GetGroupByName(string name)
10221022
10231023
10241024 var group = LoadedProfileFileData . Groups . FirstOrDefault ( x => x . Name . Equals ( name ) ) ;
1025-
1025+
10261026 if ( group == null )
10271027 throw new InvalidOperationException ( $ "Group '{ name } ' not found.") ;
10281028
@@ -1089,12 +1089,12 @@ public static bool GroupExists(string name)
10891089 public static bool IsGroupEmpty ( string name )
10901090 {
10911091 ArgumentException . ThrowIfNullOrWhiteSpace ( name ) ;
1092-
1092+
10931093 var group = LoadedProfileFileData . Groups . FirstOrDefault ( x => x . Name == name ) ;
1094-
1094+
10951095 if ( group == null )
10961096 throw new InvalidOperationException ( $ "Group '{ name } ' not found.") ;
1097-
1097+
10981098 return group . Profiles . Count == 0 ;
10991099 }
11001100
@@ -1118,7 +1118,7 @@ public static void AddProfile(ProfileInfo profile)
11181118 AddGroup ( new GroupInfo ( profile . Group ) ) ;
11191119
11201120 var group = LoadedProfileFileData . Groups . FirstOrDefault ( x => x . Name . Equals ( profile . Group ) ) ;
1121-
1121+
11221122 if ( group == null )
11231123 throw new InvalidOperationException ( $ "Group '{ profile . Group } ' not found for profile after creation attempt.") ;
11241124
@@ -1144,7 +1144,7 @@ public static void ReplaceProfile(ProfileInfo oldProfile, ProfileInfo newProfile
11441144
11451145 // Remove from old group
11461146 var oldGroup = LoadedProfileFileData . Groups . FirstOrDefault ( x => x . Name . Equals ( oldProfile . Group ) ) ;
1147-
1147+
11481148 if ( oldGroup == null )
11491149 throw new InvalidOperationException ( $ "Group '{ oldProfile . Group } ' not found for old profile.") ;
11501150
@@ -1155,7 +1155,7 @@ public static void ReplaceProfile(ProfileInfo oldProfile, ProfileInfo newProfile
11551155 AddGroup ( new GroupInfo ( newProfile . Group ) ) ;
11561156
11571157 var newGroup = LoadedProfileFileData . Groups . FirstOrDefault ( x => x . Name . Equals ( newProfile . Group ) ) ;
1158-
1158+
11591159 if ( newGroup == null )
11601160 throw new InvalidOperationException ( $ "Group '{ newProfile . Group } ' not found for new profile after creation attempt.") ;
11611161
@@ -1177,7 +1177,7 @@ public static void RemoveProfile(ProfileInfo profile)
11771177 ArgumentException . ThrowIfNullOrWhiteSpace ( profile . Group , nameof ( profile ) ) ;
11781178
11791179 var group = LoadedProfileFileData . Groups . FirstOrDefault ( x => x . Name . Equals ( profile . Group ) ) ;
1180-
1180+
11811181 if ( group == null )
11821182 throw new InvalidOperationException ( $ "Group '{ profile . Group } ' not found.") ;
11831183
@@ -1205,7 +1205,7 @@ public static void RemoveProfiles(IEnumerable<ProfileInfo> profiles)
12051205 }
12061206
12071207 var group = LoadedProfileFileData . Groups . FirstOrDefault ( x => x . Name . Equals ( profile . Group ) ) ;
1208-
1208+
12091209 if ( group == null )
12101210 {
12111211 Log . Warn ( $ "RemoveProfiles: Group '{ profile . Group } ' not found for profile '{ profile . Name ?? "<unnamed>" } '.") ;
0 commit comments