public static void AddUser(this ICakeContext context, string samAccountName, string ouDistinguishedName, UserSettings settings) { if (context == null) { throw new ArgumentNullException(nameof(context)); } var userCreate = new UserCreate(new ADOperator(settings.LoginName, settings.Password, settings.DomainName)); userCreate.CreateUser(samAccountName, ouDistinguishedName, settings); }
public void CreateUser() { _userCreate.CreateUser(SamAccountName, OuDistinguishedName, Settings); }