src/VirtualAutoClicker/AutoClickerWorker.cs
/// <summary>
/// Retrieves an autoclicker with given name
/// </summary>
/// <param name="acName"></param>
/// <returns></returns>
Retrieves an autoclicker with given name
Retrieves an autoclicker with given name
public AutoClicker? GetAutoclicker(string acName)
        {
            var acWorker = VacEnvironment.GetAcWorker();
            var ac = acWorker?.AutoClickers.FirstOrDefault(a => a.Value.Name == acName).Value;
            if (ac is null)
            {
                ConsoleHelper.WriteWarning($"Couldn't find an autoclicker named '{acName}'. Use command 'list' to see all running autoclickers.");
            }
            return ac;
        }
public AutoClicker ? GetAutoclicker ( string acName ) { var acWorker = VacEnvironment . GetAcWorker ( ) ; var ac = acWorker ? . AutoClickers . FirstOrDefault ( a => a . Value . Name == acName ) . Value ; if ( ac is null ) { ConsoleHelper . WriteWarning ( $" Couldn't find an autoclicker named ' { acName } '. Use command 'list' to see all running autoclickers. " ) ; } return ac ; }
Retrieves an autoclicker with given name
Retrieves an autoclicker with given name
None
acName
string
None