Reputation: 5072
I am trying to retrieve an existing board background color or image using Manatee.Trello. Here is what I've tried so far :
Board myboard = new Search(SearchFor.TextInName("MyAwesomeBoard"), 1, SearchModelType.Boards).Boards.FirstOrDefault();
var boardColor = myboard.Preferences.Background.Color;
var boardImg = myboard.Preferences.Background.Image;
According to the accessors signatures, this should return either a string
or a WebColor
.
It compiles fine, but at runtime I get the following error :
NullReferenceException: Object reference not set to an instance of an object
Even though the board currently has an image or color background. Is there another way to access this info or is there a bug in Manatee.Trello ?
Upvotes: -1
Views: 212
Reputation: 8428
This is a bug in the search and will be resolved in the next release. I've created issue 68 to track it.
Please see version 1.17.0 for the fix.
Upvotes: 2