Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RoslynExpressionEditor throws NullReferenceException when triggered from IActivityTemplateFactory #7

Closed
cloudhack opened this issue May 17, 2018 · 0 comments

Comments

@cloudhack
Copy link

If you add an activity that implements IActivityTemplateFactory ( ForEach Activity for instance ) the editor throws an NullReferenceException at CreateExpressionEditor
( if you clear the declaredVariables list, you wont get the NullReferenceException any more, but then intellisense will not work )

I think the error happens in UpdateInstance in the RoslynExpressionEditorInstance
This ugly hack, seemed to solve the issue for me

` variableDeclarations = string.Join("", variables.Select(v => {
var c = v.GetCurrentValue() as System.Activities.Variable;
if (c != null) return c.Type.FullName + " " + c.Name + ";\n";
var d = v.GetCurrentValue() as System.Activities.DelegateArgument;
if (d != null) return d.Type.FullName + " " + d.Name + ";\n";
return null;
//return d.Type.FullName + " " + d.Name + ";\n";
}).ToArray());

`

manureini pushed a commit to manureini/Rehosted-Workflow-Designer that referenced this issue Aug 2, 2018
I can not reproduce - but looks good :P
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants