internal Label(IJsonLabel json, TrelloAuthorization auth) { Id = json.Id; _context = new LabelContext(Id, auth); _board = new Field <Board>(_context, nameof(Board)); _color = new Field <LabelColor?>(_context, nameof(Color)); _color.AddRule(EnumerationRule <LabelColor?> .Instance); _name = new Field <string>(_context, nameof(Name)); _uses = new Field <int?>(_context, nameof(Uses)); _context.Merge(json); }
internal Label(IJsonLabel json, TrelloAuthorization auth) { Id = json.Id; _context = new LabelContext(Id, auth); _board = new Field <Board>(_context, nameof(Board)); _color = new Field <LabelColor?>(_context, nameof(Color)); _color.AddRule(EnumerationRule <LabelColor?> .Instance); _name = new Field <string>(_context, nameof(Name)); _context.Merge(json); if (auth != TrelloAuthorization.Null) { TrelloConfiguration.Cache.Add(this); } }
void IMergeJson <IJsonLabel> .Merge(IJsonLabel json, bool overwrite) { _context.Merge(json, overwrite); }
void IMergeJson <IJsonLabel> .Merge(IJsonLabel json) { _context.Merge(json); }