private static IPowerUp BuildConfiguredPowerUp(IJsonPowerUp json, TrelloAuthorization auth)
        {
            if (!TrelloConfiguration.RegisteredPowerUps.TryGetValue(json.Id, out var factory))
            {
                return(null);
            }

            return(factory(json, auth));
        }
示例#2
0
        /// <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)
 {
 }
示例#4
0
 internal UnknownPowerUp(IJsonPowerUp json, TrelloAuthorization auth)
     : base(json, auth)
 {
 }