public CommandStruct(QueryRunner instance, Plugin class_, MethodInfo methodName, ClientCommand command, ServerGroups serverGroups = null) { Ts3Instance = instance; Class = class_; Method = methodName; Command = command; ServerGroups = serverGroups ?? new ServerGroups(); }
private void BuildFields() { var newServers = new List <Server>(); var newServerGroupMap = new Dictionary <string, ServerGroup>(StringComparer.OrdinalIgnoreCase); if (ServerGroups == null) { ServerGroups = new ServerGroup[0]; } ServerGroups.ForEach(serverGroup => { newServers.AddRange(serverGroup.Servers); newServerGroupMap[serverGroup.GroupId] = serverGroup; }); servers = newServers; serverGroupMap = newServerGroupMap; }