internal DropDownOption(IJsonCustomDropDownOption json, TrelloAuthorization auth)
        {
            _context = new DropDownOptionContext(auth);
            _context.Merge(json);

            _field      = new Field <CustomFieldDefinition>(_context, nameof(Field));
            _text       = new Field <string>(_context, nameof(Text));
            _labelColor = new Field <LabelColor?>(_context, nameof(LabelColor));
            _position   = new Field <Position>(_context, nameof(Position));

            TrelloConfiguration.Cache.Add(this);
        }
Exemple #2
0
        internal DropDownOption(IJsonCustomDropDownOption json, TrelloAuthorization auth, bool created = false)
        {
            _context = new DropDownOptionContext(json, auth, created);

            _field      = new Field <CustomFieldDefinition>(_context, nameof(Field));
            _text       = new Field <string>(_context, nameof(Text));
            _labelColor = new Field <LabelColor?>(_context, nameof(Color));
            _position   = new Field <Position>(_context, nameof(Position));

            if (!created && auth != TrelloAuthorization.Null)
            {
                TrelloConfiguration.Cache.Add(this);
            }
        }