예제 #1
0
        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);
        }
예제 #2
0
        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);
            }
        }
예제 #3
0
 void IMergeJson <IJsonLabel> .Merge(IJsonLabel json, bool overwrite)
 {
     _context.Merge(json, overwrite);
 }
예제 #4
0
 void IMergeJson <IJsonLabel> .Merge(IJsonLabel json)
 {
     _context.Merge(json);
 }