WPF.NET4、工作流参数和;处理时遇到编译器错误“;

WPF.NET4、工作流参数和;处理时遇到编译器错误“;,.net,workflow-foundation,workflow-activity,.net,Workflow Foundation,Workflow Activity,我的工作流程: <Activity mc:Ignorable="sap" x:Class="QCISRApplication.QCISRTest1" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:local="clr-namespace:QCISRApplica

我的工作流程:

<Activity mc:Ignorable="sap" x:Class="QCISRApplication.QCISRTest1" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:local="clr-namespace:QCISRApplication" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mv="clr-namespace:Microsoft.VisualBasic;assembly=System" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:s1="clr-namespace:System;assembly=System" xmlns:s2="clr-namespace:System;assembly=System.Xml" xmlns:s3="clr-namespace:System;assembly=System.Core" xmlns:s4="clr-namespace:System;assembly=System.ServiceModel" xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities" xmlns:sad="clr-namespace:System.Activities.Debugger;assembly=System.Activities" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=System" xmlns:scg1="clr-namespace:System.Collections.Generic;assembly=System.ServiceModel" xmlns:scg2="clr-namespace:System.Collections.Generic;assembly=System.Core" xmlns:scg3="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sd="clr-namespace:System.Data;assembly=System.Data" xmlns:sd1="clr-namespace:System.Data;assembly=System.Data.DataSetExtensions" xmlns:sl="clr-namespace:System.Linq;assembly=System.Core" xmlns:st="clr-namespace:System.Text;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
 <x:Members>
  <x:Property Name="InputLine" Type="InArgument(sd:DataRow)" />
 </x:Members>
 <sap:VirtualizedContainerService.HintSize>772,961</sap:VirtualizedContainerService.HintSize>
 <mva:VisualBasic.Settings>Assembly references and imported namespaces for internal implementation</mva:VisualBasic.Settings>
 <Flowchart sad:XamlDebuggerXmlReader.FileName="C:\PRJ\JD Powers\QCISR Tests Application\Main\Source\QC ISR\QCISRWorkbook2010\QCISRTest1.xaml" sap:VirtualizedContainerService.HintSize="732,921">
  <Flowchart.Variables>
   <Variable x:TypeArguments="x:Double" Name="Var1" />
   <Variable x:TypeArguments="x:Double" Name="Var2" />
   <Variable x:TypeArguments="x:Double" Name="PIN_Transaction_Count" />
  </Flowchart.Variables>
  <sap:WorkflowViewStateService.ViewState>
   <scg3:Dictionary x:TypeArguments="x:String, x:Object">
    <x:Boolean x:Key="IsExpanded">False</x:Boolean>
    <av:Point x:Key="ShapeLocation">230,2.5</av:Point>
    <av:Size x:Key="ShapeSize">60,75</av:Size>
    <av:PointCollection x:Key="ConnectorLocation">260,77.5 260,107.5 260,145.5</av:PointCollection>
    <x:Double x:Key="Width">718</x:Double>
    <x:Double x:Key="Height">885</x:Double>
   </scg3:Dictionary>
  </sap:WorkflowViewStateService.ViewState>
  <Flowchart.StartNode>
   <FlowStep x:Name="__ReferenceID0">
    <sap:WorkflowViewStateService.ViewState>
     <scg3:Dictionary x:TypeArguments="x:String, x:Object">
      <av:Point x:Key="ShapeLocation">160,145.5</av:Point>
      <av:Size x:Key="ShapeSize">200,49</av:Size>
      <av:PointCollection x:Key="ConnectorLocation">260,194.5 260,224.5 255,224.5 255,282.5</av:PointCollection>
     </scg3:Dictionary>
    </sap:WorkflowViewStateService.ViewState>
    <Sequence DisplayName="Read Values" sap:VirtualizedContainerService.HintSize="200,49">
     <sap:WorkflowViewStateService.ViewState>
      <scg3:Dictionary x:TypeArguments="x:String, x:Object">
       <x:Boolean x:Key="IsExpanded">True</x:Boolean>
      </scg3:Dictionary>
     </sap:WorkflowViewStateService.ViewState>
     <Assign sap:VirtualizedContainerService.HintSize="242,57">
      <Assign.To>
       <OutArgument x:TypeArguments="x:Double">[Var1]</OutArgument>
      </Assign.To>
      <Assign.Value>
       <InArgument x:TypeArguments="x:Double">67</InArgument>
      </Assign.Value>
     </Assign>
     <Assign sap:VirtualizedContainerService.HintSize="242,57">
      <Assign.To>
       <OutArgument x:TypeArguments="x:Double">[Var2]</OutArgument>
      </Assign.To>
      <Assign.Value>
       <InArgument x:TypeArguments="x:Double">90</InArgument>
      </Assign.Value>
     </Assign>
     <Assign sap:VirtualizedContainerService.HintSize="242,57">
      <Assign.To>
       <OutArgument x:TypeArguments="x:Double">[PIN_Transaction_Count]</OutArgument>
      </Assign.To>
      <Assign.Value>
       <InArgument x:TypeArguments="x:Double">3</InArgument>
      </Assign.Value>
     </Assign>
    </Sequence>
    <FlowStep.Next>
     <FlowDecision x:Name="__ReferenceID1" Condition="[Var1 - Var2 &lt; 0.1]" sap:VirtualizedContainerService.HintSize="60,75">
      <sap:WorkflowViewStateService.ViewState>
       <scg3:Dictionary x:TypeArguments="x:String, x:Object">
        <av:Point x:Key="ShapeLocation">210,282.5</av:Point>
        <av:Size x:Key="ShapeSize">60,75</av:Size>
        <av:PointCollection x:Key="FalseConnector">270,320 420,320 420,407.5</av:PointCollection>
        <av:PointCollection x:Key="TrueConnector">210,320 120,320 120,412.5</av:PointCollection>
       </scg3:Dictionary>
      </sap:WorkflowViewStateService.ViewState>
      <FlowDecision.True>
       <FlowDecision x:Name="__ReferenceID3" Condition="[PIN_Transaction_Count &gt;= 3]" sap:VirtualizedContainerService.HintSize="60,75">
        <sap:WorkflowViewStateService.ViewState>
         <scg3:Dictionary x:TypeArguments="x:String, x:Object">
          <av:Point x:Key="ShapeLocation">90,412.5</av:Point>
          <av:Size x:Key="ShapeSize">60,75</av:Size>
          <av:PointCollection x:Key="FalseConnector">150,450 180,450 180,640 316,640</av:PointCollection>
          <av:PointCollection x:Key="TrueConnector">90,450 80,450 80,677.5 110,677.5 110,707.5</av:PointCollection>
         </scg3:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
        <FlowDecision.True>
         <FlowStep x:Name="__ReferenceID5">
          <sap:WorkflowViewStateService.ViewState>
           <scg3:Dictionary x:TypeArguments="x:String, x:Object">
            <av:Point x:Key="ShapeLocation">6,707.5</av:Point>
            <av:Size x:Key="ShapeSize">208,125</av:Size>
           </scg3:Dictionary>
          </sap:WorkflowViewStateService.ViewState>
          <InvokeMethod DisplayName="GreenLineSTATIC" sap:VirtualizedContainerService.HintSize="208,125" MethodName="DoGreenLine" TargetType="local:ResultsHightlighter" />
         </FlowStep>
        </FlowDecision.True>
        <FlowDecision.False>
         <FlowStep x:Name="__ReferenceID4">
          <sap:WorkflowViewStateService.ViewState>
           <scg3:Dictionary x:TypeArguments="x:String, x:Object">
            <av:Point x:Key="ShapeLocation">316,577.5</av:Point>
            <av:Size x:Key="ShapeSize">208,125</av:Size>
            <av:PointCollection x:Key="ConnectorLocation">380,597.5 380,567.5 190,567.5 190,597.5 130,597.5 130,567.5</av:PointCollection>
           </scg3:Dictionary>
          </sap:WorkflowViewStateService.ViewState>
          <InvokeMethod sap:VirtualizedContainerService.HintSize="208,125" MethodName="DoRedLine2" TargetType="local:ResultsHightlighter" />
         </FlowStep>
        </FlowDecision.False>
       </FlowDecision>
      </FlowDecision.True>
      <FlowDecision.False>
       <FlowStep x:Name="__ReferenceID2">
        <sap:WorkflowViewStateService.ViewState>
         <scg3:Dictionary x:TypeArguments="x:String, x:Object">
          <av:Point x:Key="ShapeLocation">316,407.5</av:Point>
          <av:Size x:Key="ShapeSize">208,125</av:Size>
         </scg3:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
        <InvokeMethod DisplayName="RedLine1STATIC" sap:VirtualizedContainerService.HintSize="208,125" MethodName="DoRedLine" TargetType="local:ResultsHightlighter" />
       </FlowStep>
      </FlowDecision.False>
     </FlowDecision>
    </FlowStep.Next>
   </FlowStep>
  </Flowchart.StartNode>
  <x:Reference>__ReferenceID0</x:Reference>
  <x:Reference>__ReferenceID1</x:Reference>
  <x:Reference>__ReferenceID2</x:Reference>
  <x:Reference>__ReferenceID3</x:Reference>
  <x:Reference>__ReferenceID4</x:Reference>
  <x:Reference>__ReferenceID5</x:Reference>
 </Flowchart>
</Activity>

772,961
用于内部实现的程序集引用和导入的命名空间
错误的
230,2.5
60,75
260,77.5 260,107.5 260,145.5
718
885
160,145.5
200,49
260,194.5 260,224.5 255,224.5 255,282.5
符合事实的
[Var1]
67
[Var2]
90
[PIN\交易\计数]
3.
210,282.5
60,75
270,320 420,320 420,407.5
210,320 120,320 120,412.5
90,412.5
60,75
150,450 180,450 180,640 316,640
90,450 80,450 80,677.5 110,677.5 110,707.5
6,707.5
208,125
316,577.5
208,125
380,597.5 380,567.5 190,567.5 190,597.5 130,597.5 130,567.5
316,407.5
208,125
__参考文献0
__参考文献1
__参考2
__参考文献3
__参考4
__参考文献5
我的C#代码:

private void main control\u OnProcess(对象发送方、路由目标方)
{
QCISRTest1 qct=新的QCISRTest1();
qct.Var1=3.6;
qct.Var2=35.7;
qct.PIN_事务_计数=8;
Dictionary res=新字典(WorkflowInvoker.Invoke(qct));
}
就在我调用WorkflowInvoker.Invoke的那一刻,我得到了以下异常:

System.Activities.dll中出现“System.Activities.ExpressionParser.SourceExpressionException”类型的第一次意外异常。其他信息:处理表达式“PIN_Transaction_Count>=3.0”时遇到编译器错误未声明PIN_事务_计数”。由于其保护级别,可能无法访问

我想知道为什么会出现这种异常,以及如何避免它

private void MainControl_OnProcess(object sender, RoutedEventArgs e)
{
  QCISRTest1 qct = new QCISRTest1();
  qct.Var1 = 3.6;
  qct.Var2 = 35.7;
  qct.PIN_Transaction_Count = 8;
  Dictionary<string , object > res = new Dictionary<string,object> ( WorkflowInvoker.Invoke(qct)); 

}