Skip to content

Commit

Permalink
fix: Invalid debug-only message
Browse files Browse the repository at this point in the history
Fixes the `The Bindable attribute is missing` message showing up in debug only configuration, reporting that types are not present in the generated bindable metadata.
  • Loading branch information
jeromelaban committed Dec 9, 2021
1 parent c26bd89 commit 08ec732
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ private void GenerateTypeTable(IndentedStringBuilder writer)
writer.AppendLineInvariant(@"#if DEBUG");
using (writer.BlockInvariant(@"lock(_knownMissingTypes)"))
{
using (writer.BlockInvariant(@"if(!_knownMissingTypes.Contains(type) && !type.IsGenericType)"))
using (writer.BlockInvariant(@"if(bindableType == null && !_knownMissingTypes.Contains(type) && !type.IsGenericType)"))
{
writer.AppendLineInvariant(@"_knownMissingTypes.Add(type);");
writer.AppendLineInvariant(@"Debug.WriteLine($""The Bindable attribute is missing and the type [{{type.FullName}}] is not known by the MetadataProvider. Reflection was used instead of the binding engine and generated static metadata. Add the Bindable attribute to prevent this message and performance issues."");");
Expand Down

0 comments on commit 08ec732

Please sign in to comment.