Status error: property not declared. It may not be available due to its level of protection.

I have a workflow whose root activity is a regular NativeActivity with a public InArgument called XmlData. When I try to use this argument in a child case. If I get an action, I get the following error using XmlData in this condition:

'XmlData' is not declared. It may be inaccessible due to its protection level

My properties are as follows:

public Activity Body {get;set;}
public InArgument<CustomObj> XmlData {get;set;}

and this is the CacheMetadata method:

protected override void CacheMetadata(NativeActivityMetadata metadata)
    {
        var runtime = new RuntimeArgument("XmlData",typeof(CustomObj),ArgumentDirection.In,true);
        metadata.Bind(this.XmlData,runtime);
        metadata.AddArgument(runtime);

        metadata.AddChild(Body);
    }

I add an argument inside CacheMetadata using the metadata.AddArgument method, and I tried to add a child property that it has using AddChild and AddImplementationChild.

ActivityBuilder DynamicActivityProperty, , , , .

+3
1

3 , , - , - , - .

1 () RuntimeArgument readonly Bind AddArgument, , .

2 ( )

3 () InArgument , .

?

0

Source: https://habr.com/ru/post/1747158/


All Articles