internal BoardBackground(IJsonBoardBackground json, TrelloAuthorization auth) { Id = json.Id; _context = new BoardBackgroundContext(auth); _context.Merge(json); _color = new Field <WebColor>(_context, nameof(Color)); _image = new Field <string>(_context, nameof(Image)); _isTiled = new Field <bool?>(_context, nameof(IsTiled)); ScaledImages = new ReadOnlyBoardBackgroundScalesCollection(_context, auth); TrelloConfiguration.Cache.Add(this); }
private BoardBackground(string id) { Id = id; _context = new BoardBackgroundContext(TrelloAuthorization.Default); Json.Id = id; _color = new Field <WebColor>(_context, nameof(Color)); _image = new Field <string>(_context, nameof(Image)); _isTiled = new Field <bool?>(_context, nameof(IsTiled)); ScaledImages = new ReadOnlyBoardBackgroundScalesCollection(_context, TrelloAuthorization.Default); TrelloConfiguration.Cache.Add(this); }
internal BoardBackground(string ownerId, IJsonBoardBackground json, TrelloAuthorization auth) { Id = json.Id; _context = new BoardBackgroundContext(ownerId, auth); _context.Merge(json); _brightness = new Field <BoardBackgroundBrightness?>(_context, nameof(Brightness)); _color = new Field <WebColor>(_context, nameof(Color)); _topColor = new Field <WebColor>(_context, nameof(TopColor)); _bottomColor = new Field <WebColor>(_context, nameof(BottomColor)); _image = new Field <string>(_context, nameof(Image)); _isTiled = new Field <bool?>(_context, nameof(IsTiled)); _type = new Field <BoardBackgroundType?>(_context, nameof(Type)); ScaledImages = new ReadOnlyBoardBackgroundScalesCollection(_context, auth); if (auth != TrelloAuthorization.Null) { TrelloConfiguration.Cache.Add(this); } }