c# - What is the difference between these two XAML in workflow foundation? -
came across 2 types of xaml specified in windows workflow foundation, want know differences.
type 1.
<?xml version="1.0" encoding="utf-8"?> <!-- copyright (c) microsoft corporation. rights reserved. --> <activity mc:ignorable="sap" x:class="microsoft.samples.invokemethodusage.sequence1" mva:visualbasic.settings="assembly references , imported namespaces serialized xml namespaces" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:msi="clr-namespace:microsoft.samples.invokemethodusage;assembly=invokemethodusage" xmlns:msi1="clr-namespace:microsoft.samples.invokemethodusage;assembly=invokemethodusage, version=1.0.3516.24075, culture=neutral, publickeytoken=null" 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: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=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <sequence sap:virtualizedcontainerservice.hintsize="333.663333333333,3387.23666666666"> <sequence.variables> <variable x:typearguments="x:string" default="["this out param"]" name="outparam" /> <variable x:typearguments="x:int32" name="resultvalue" /> <variable x:typearguments="msi:testclass" default="[new testclass()]" name="vartestclass" /> </sequence.variables> <sap:workflowviewstateservice.viewstate> <scg:dictionary x:typearguments="x:string, s:object"> <x:boolean x:key="isexpanded">true</x:boolean> </scg:dictionary> </sap:workflowviewstateservice.viewstate> <writeline sap:virtualizedcontainerservice.hintsize="299.663333333333,59.2766666666667" text="["instance method call"]" /> <invokemethod displayname="instance method call" sap:virtualizedcontainerservice.hintsize="299.663333333333,127.553333333333" methodname="instancemethod1"> <invokemethod.targetobject> <inargument x:typearguments="msi:testclass">[new testclass()]</inargument> </invokemethod.targetobject> </invokemethod> <writeline sap:virtualizedcontainerservice.hintsize="299.663333333333,59.2766666666667" text="["instance method call parameters"]" /> <invokemethod displayname="instance method call parameters" sap:virtualizedcontainerservice.hintsize="299.663333333333,127.553333333333" methodname="instancemethod"> <invokemethod.targetobject> <inargument x:typearguments="msi:testclass">[new testclass()]</inargument> </invokemethod.targetobject> <inargument x:typearguments="x:string">["my favorite number is"]</inargument> <inargument x:typearguments="x:int32">42</inargument> </invokemethod> <writeline sap:virtualizedcontainerservice.hintsize="299.663333333333,59.2766666666667" text="["instance method call parameter arrays"]" /> <invokemethod displayname="instance method call parameter arrays" sap:virtualizedcontainerservice.hintsize="299.663333333333,127.553333333333" methodname="instancemethod"> <invokemethod.targetobject> <inargument x:typearguments="msi:testclass">[new testclass()]</inargument> </invokemethod.targetobject> <inargument x:typearguments="x:string">["my favorite number is"]</inargument> <inargument x:typearguments="x:int32">42</inargument> <inargument x:typearguments="x:string">["first item of param array"]</inargument> <inargument x:typearguments="x:string">["second item of param array"]</inargument> <inargument x:typearguments="x:string">["third item of param array"]</inargument> </invokemethod> <writeline sap:virtualizedcontainerservice.hintsize="299.663333333333,59.2766666666667" text="["instance method call parameters , return value"]" /> <invokemethod displayname="instance method call parameters , return value" sap:virtualizedcontainerservice.hintsize="299.663333333333,127.553333333333" methodname="instancemethodwithresult"> <invokemethod.result> <outargument x:typearguments="x:int32">[resultvalue]</outargument> </invokemethod.result> <invokemethod.targetobject> <inargument x:typearguments="msi:testclass">[new testclass()]</inargument> </invokemethod.targetobject> <inargument x:typearguments="x:int32">20</inargument> <inargument x:typearguments="x:int32">22</inargument> </invokemethod> <writeline sap:virtualizedcontainerservice.hintsize="299.663333333333,59.2766666666667" text="[string.format("....result: {0}", resultvalue)]" /> <writeline sap:virtualizedcontainerservice.hintsize="299.663333333333,59.2766666666667" text="["static method call parameters"]" /> <invokemethod displayname="static method call parameters" sap:virtualizedcontainerservice.hintsize="299.663333333333,127.553333333333" methodname="staticmethod" targettype="msi:testclass"> <inargument x:typearguments="x:string">["my favorite number is"]</inargument> <inargument x:typearguments="x:int32">42</inargument> </invokemethod> <writeline sap:virtualizedcontainerservice.hintsize="299.663333333333,59.2766666666667" text="["generic instance method call generic parameters"]" /> <invokemethod displayname="generic instance method call generic parameters" sap:virtualizedcontainerservice.hintsize="299.663333333333,127.553333333333" methodname="genericinstancemethod"> <invokemethod.generictypearguments> <x:type type="x:string" /> </invokemethod.generictypearguments> <invokemethod.targetobject> <inargument x:typearguments="msi:testclass">[new testclass()]</inargument> </invokemethod.targetobject> <inargument x:typearguments="x:string">["hello world"]</inargument> </invokemethod> <writeline sap:virtualizedcontainerservice.hintsize="299.663333333333,59.2766666666667" text="["generic static method call 2 generic parameters"]" /> <invokemethod displayname="generic static method call 2 generic parameters" sap:virtualizedcontainerservice.hintsize="299.663333333333,127.553333333333" methodname="genericstaticmethod" targettype="msi:testclass"> <invokemethod.generictypearguments> <x:type type="x:string" /> <x:type type="x:int32" /> </invokemethod.generictypearguments> <inargument x:typearguments="x:string">["favorite number"]</inargument> <inargument x:typearguments="x:int32">42</inargument> </invokemethod> <writeline sap:virtualizedcontainerservice.hintsize="299.663333333333,59.2766666666667" text="["instance method call parameters reference"]" /> <invokemethod displayname="instance method call parameters rerefence" sap:virtualizedcontainerservice.hintsize="299.663333333333,127.553333333333" methodname="instancemethod"> <invokemethod.targetobject> <inargument x:typearguments="msi:testclass">[new testclass()]</inargument> </invokemethod.targetobject> <inargument x:typearguments="x:string">["my favorite number is"]</inargument> <inargument x:typearguments="x:int32">42</inargument> <inoutargument x:typearguments="x:string">[outparam]</inoutargument> </invokemethod> <writeline sap:virtualizedcontainerservice.hintsize="299.663333333333,59.2766666666667" text="[string.format("....out param changed to: {0}", outparam)]" /> <writeline sap:virtualizedcontainerservice.hintsize="299.663333333333,59.2766666666667" text="["async instance method call"]" /> <invokemethod displayname="async instance method call" sap:virtualizedcontainerservice.hintsize="299.663333333333,127.553333333333" methodname="asyncmethodsample" runasynchronously="true"> <invokemethod.targetobject> <inargument x:typearguments="msi:testclass">[new testclass()]</inargument> </invokemethod.targetobject> <inargument x:typearguments="x:string">["hello async"]</inargument> </invokemethod> <writeline sap:virtualizedcontainerservice.hintsize="299.663333333333,59.2766666666667" text="["store value"]" /> <invokemethod displayname="store value in instance" sap:virtualizedcontainerservice.hintsize="299.663333333333,127.553333333333" methodname="storevalue"> <invokemethod.targetobject> <inargument x:typearguments="msi:testclass">[vartestclass]</inargument> </invokemethod.targetobject> <inargument x:typearguments="x:int32">42</inargument> </invokemethod> <writeline sap:virtualizedcontainerservice.hintsize="299.663333333333,59.2766666666667" text="["get value"]" /> <invokemethod displayname="get value instance" sap:virtualizedcontainerservice.hintsize="299.663333333333,127.553333333333" methodname="getvalue"> <invokemethod.result> <outargument x:typearguments="x:int32">[resultvalue]</outargument> </invokemethod.result> <invokemethod.targetobject> <inargument x:typearguments="msi:testclass">[vartestclass]</inargument> </invokemethod.targetobject> </invokemethod> <invokemethod displayname="write blank line console" sap:virtualizedcontainerservice.hintsize="299.663333333333,127.553333333333" methodname="writeline" targettype="s:console"> <inargument x:typearguments="x:string">[string.format("....the stored value {0}", resultvalue)]</inargument> </invokemethod> </sequence>
type 2.
<sequentialworkflowactivity x:class="myxmsapplication.workflow2" x:name="workflow2" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/workflow">| <whileactivity x:name="whileactivity1"> <whileactivity.condition> <ruleconditionreference conditionname="condition1" /> </whileactivity.condition> <ifelseactivity x:name="ifelseactivity1"> <ifelsebranchactivity x:name="ifelsebranchactivity1"> <ifelsebranchactivity.condition> <ruleconditionreference conditionname="condition2" /> </ifelsebranchactivity.condition> <codeactivity x:name="codeactivity1" executecode="codeactivity1_executecode" /> </ifelsebranchactivity> <ifelsebranchactivity x:name="ifelsebranchactivity2"> <ifelsebranchactivity.condition> <ruleconditionreference conditionname="condition3" /> </ifelsebranchactivity.condition> <codeactivity x:name="codeactivity2" executecode="codeactivity2_executecode" /> </ifelsebranchactivity> </ifelseactivity> </whileactivity>
observation
its not data inside xaml, structure. former root tag activity, , child sequence, while latter starts wide name sequenceworkflowactivity. in workflow foundation explain differences?
the xaml in type 1 4.x version of windows workflow foundation, while type 2 sample 3.x version.
Comments
Post a Comment