private static IPowerUp BuildConfiguredPowerUp(IJsonPowerUp json, TrelloAuthorization auth) { if (!TrelloConfiguration.RegisteredPowerUps.TryGetValue(json.Id, out var factory)) { return(null); } return(factory(json, auth)); }
/// <summary> /// Initializes a power-up. /// </summary> protected PowerUpBase(IJsonPowerUp json, TrelloAuthorization auth) { Id = json.Id; _context = new PowerUpContext(Id, auth); _additionalInfo = new Field <string>(_context, nameof(AdditionalInfo)); _name = new Field <string>(_context, nameof(Name)); _public = new Field <bool?>(_context, nameof(Public)); }
private CustomFieldsPowerUp(IJsonPowerUp json, TrelloAuthorization auth) : base(json, auth) { }
internal UnknownPowerUp(IJsonPowerUp json, TrelloAuthorization auth) : base(json, auth) { }