I have a Workflow Foundation 4.5 WCF Workflow application. I am trying to return Dictionary<IEdmEntityType, DataTable>from mine CodeActivity<Dictionary<IEdmEntityType, DataTable>>. The code does not encounter a compile-time error, but XAML cannot compile.
The relevant parts of my XAML look like this:
We have variable declarations for the sequence where I am trying to reset my return value. The variable we are trying to assign is called EntityTableRelationships.
<p1:Sequence.Variables>
<p1:Variable x:TypeArguments="x:String" Name="MetadataContent" />
<p1:Variable x:TypeArguments="scg:Dictionary(mde:IEdmEntityType, sd:DataTable)" Name="EntityTableRelationships" />
</p1:Sequence.Variables>
There is also a OutArgumentreturn value from Execute, from our CodeActivity<..>assigned EntityTableRelationships.
<o:TransformMetadataToTables.Result>
<p1:OutArgument x:TypeArguments="scg:Dictionary(mde:IEdmEntityType, sd:DataTable)">
<mca:CSharpReference x:TypeArguments="scg:Dictionary(mde:IEdmEntityType, sd:DataTable)">EntityTableRelationships</mca:CSharpReference>
</p1:OutArgument>
</o:TransformMetadataToTables.Result>
XAML validation bug fixed:
Type 'http://schemas.microsoft.com/netfx/2009/xaml/activities:OutArgument(Dictionary)' is not assignable to type 'http://schemas.microsoft.com/netfx/2009/xaml/activities:OutArgument(Dictionary)' of member 'EntityTableRelationships'.

, , , , . .
, , , Dictionary<TKey, TValue> TKey . , , . , . IEdmEntityType TKey, , , .
?
№ 1
, DataTable. DataSet . , , , , MarshalByValueComponent, TypeConverterAttribute. TypeConverter XAML , WF 4.5. , .
Dictionary<TKey, DataTable> WF 4.5 , .
№ 2
, DataTable. Dictionary<IEdmEntityType, object>.
System.Data System.Object, .
, , , -, .
IEdmEntityType IMyInterface, :
public interface IMyInterface
{
int Id
{
get;
}
}
MyStruct . :
public struct MyStruct
{
public int A;
public int B;
}
MyClass . :
public class MyClass
{
public int A;
public int B;
}
MyClassComplex object .
public class MyClassComplex
{
public int A
{
get;
private set;
}
public int B
{
get;
private set;
}
public object C
{
get;
private set;
}
}
, - DataTable DataSet, MyClassComplex, .
, MyClassComplex MarshalByValueComponent, , .
Dictionary<IMyInterface, DataTable> CodeActivity<IMyInterface, MyClassComplex> CodeActivity<IMyInterface, DataTable>, , .
№ 3
, , , MS Connect