From 8d8f5ff23c0d19eae1df79993cade21b5f76dbd2 Mon Sep 17 00:00:00 2001 From: Michael Ganss Date: Fri, 28 Jun 2024 17:37:07 +0200 Subject: [PATCH] Fix #522 --- XmlSchemaClassGenerator/TypeModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XmlSchemaClassGenerator/TypeModel.cs b/XmlSchemaClassGenerator/TypeModel.cs index de2d2cc..8cb1d7e 100644 --- a/XmlSchemaClassGenerator/TypeModel.cs +++ b/XmlSchemaClassGenerator/TypeModel.cs @@ -275,7 +275,7 @@ public override CodeTypeDeclaration Generate() var param = new CodeParameterDeclarationExpression(typeof(string), "propertyName = null"); param.CustomAttributes.Add(new(TypeRef())); - var threadSafeDelegateInvokeExpression = new CodeSnippetExpression($"{propertyChangedEvent.Name}?.Invoke(this, new System.ComponentModel.PropertyChangedEventArgs({param.Name}))"); + var threadSafeDelegateInvokeExpression = new CodeSnippetExpression($"{propertyChangedEvent.Name}?.Invoke(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName))"); var onPropChangedMethod = new CodeMemberMethod { Name = OnPropertyChanged,