KnownTypes For Deserializing System.Worklfow.Activities.Rules.RuleSet Through WCF

I recently ran into some trouble with exposing RuleSets through WCF and was able to get it to work by adding some KnownTypes for the datacontract.

[KnownType(typeof(System.Workflow.Activities.Rules.RuleExpressionCondition))]

[KnownType(typeof(System.CodeDom.CodeBinaryOperatorExpression))][

KnownType(typeof(System.CodeDom.CodeFieldReferenceExpression))]

[KnownType(typeof(System.CodeDom.CodeThisReferenceExpression))][

KnownType(typeof(System.CodeDom.CodePrimitiveExpression))]

[KnownType(typeof(System.CodeDom.CodePropertyReferenceExpression))][

KnownType(typeof(System.Workflow.Activities.Rules.RuleHaltAction))]

[KnownType(typeof(System.CodeDom.CodeMethodInvokeExpression))][

KnownType(typeof(System.Workflow.Activities.Rules.RuleStatementAction))]

[KnownType(typeof(System.CodeDom.CodeExpressionStatement))][

KnownType(typeof(System.CodeDom.CodeTypeReferenceExpression))]

[KnownType(typeof(System.CodeDom.CodeObjectCreateExpression))]

Check out my response to the MSDN post

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: BayerWhite
Posted on: 9/23/2008 at 1:28 AM
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (49) | Post RSSRSS comment feed

Comments

Comments are closed