title: Condition Error: Property is not declared. It may be inaccessible due to its protection level
body: <p>I've have a workflow whose root activity is a custom NativeActivity with a public InArgument called XmlData. When I try and use this argument in a child If activity I get the following error using XmlData within the condition:</p>
  
  <pre><code>'XmlData' is not declared. It may be inaccessible due to its protection level
  </code></pre>
  
  <p>My properties look like this:</p>
  
  <pre><code>public Activity Body {get;set;}
  public InArgument&lt;CustomObj&gt; XmlData {get;set;}
  </code></pre>
  
  <p>and this is the CacheMetadata method:</p>
  
  <pre><code>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);
      }
  </code></pre>
  
  <p>I'm adding the argument inside CacheMetadata using the metadata.AddArgument method, and I've tried adding the child property it has using both AddChild and AddImplementationChild.</p>
  
  <p>If I replace my custom activity with an ActivityBuilder and use code to create a DynamicActivityProperty then the condition can be compiled successfully, so I don't see what I'm missing when I use my own code.</p>