Skip to content

Commit 19cf5e4

Browse files
committed
ReadOnlyObservableCollection, ReadOnlyCollection and ReadOnlyDictionary type ignored.
#155 Related Work Items: #15, #155
1 parent 633e59b commit 19cf5e4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/FmgLib.MauiMarkup.Generator/Extensions/ExtensionGenerator.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ void GenerateClassExtensionBody()
111111
_.Type.AllInterfaces.Any(e => e.Name.Contains(nameof(IEnumerable))) &&
112112
!_.Type.Name.Equals(nameof(String), StringComparison.InvariantCultureIgnoreCase))
113113
.Where(_ => _.Type.Name.Contains(nameof(ICollection)) || _.Type.AllInterfaces.Any(e => e.Name.Contains(nameof(ICollection))) || !(_.Type.Name.Contains("IReadOnlyList") || _.Type.AllInterfaces.Any(e => e.Name.Contains("IReadOnlyList"))))
114+
.Where(_ => !(_.Type.Name.StartsWith("ReadOnlyObservableCollection") || _.Type.Name.StartsWith("ReadOnlyCollection") || _.Type.Name.StartsWith("ReadOnlyDictionary") || (_.Type.BaseType != null && (_.Type.BaseType.Name.StartsWith("ReadOnlyObservableCollection") || _.Type.BaseType.Name.StartsWith("ReadOnlyCollection") || _.Type.BaseType.Name.StartsWith("ReadOnlyDictionary")))))
114115
.ToList();
115116

116117

0 commit comments

Comments
 (0)