You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ObservableEvents do not work with generic classes like ObservableCollection.
Build the following code:
public class Class1<T>
{
public event EventHandler TestEvent;
void TestMethod()
{
ObservableCollection<Class1<int>> collection = new();
Class1<int> c = new();
c.Events().TestEvent.Subscribe();
collection.Events().PropertyChangedEventHandler.Subscribe(x => { });
}
}
will cause error: 1>CSC : warning CS8785: Generator 'EventGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'ArgumentException' with message 'The hintName 'SourceClassClassLibrary1.Class1<System.Int32>-InstanceEvents.SourceGenerated.cs' contains an invalid character '<' at position 31. 1>C:\Projects\ClassLibrary1\ClassLibrary1\Class1.cs(5,7,5,22): error CS0246: The type or namespace name 'ReactiveMarbles' could not be found (are you missing a using directive or an assembly reference?)
I think this is because '<' is not a valid character for Windows paths.
The text was updated successfully, but these errors were encountered:
Yeah, let me see if I can solve this one for you on the weekend. I've been having some family issues the last couple of months but hope to get some time this weekend to
ObservableEvents do not work with generic classes like ObservableCollection.
Build the following code:
will cause error:
1>CSC : warning CS8785: Generator 'EventGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'ArgumentException' with message 'The hintName 'SourceClassClassLibrary1.Class1<System.Int32>-InstanceEvents.SourceGenerated.cs' contains an invalid character '<' at position 31. 1>C:\Projects\ClassLibrary1\ClassLibrary1\Class1.cs(5,7,5,22): error CS0246: The type or namespace name 'ReactiveMarbles' could not be found (are you missing a using directive or an assembly reference?)
I think this is because '<' is not a valid character for Windows paths.
The text was updated successfully, but these errors were encountered: