如何使用不可序列化的参数持久化工作流程

编程入门 行业动态 更新时间:2024-10-12 12:31:09
本文介绍了如何使用不可序列化的参数持久化工作流程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个工作流,该工作流为基础组件(DAL实现,电子邮件发件人等)提供了一些参数.它还具有WCF数据协定和其他可序列化的参数.我需要坚持并卸载此工作流程,然后稍后再继续.

I have a workflow that has some arguments for underlying components (DAL implementation, email sender etc). It also has a WCF data contract and other serializable arguments. I need to persist and unload this workflow and then resume later on.

它抛出异常是因为它试图序列化并持久化所有工作流参数.有没有办法让序列化程序仅保留那些可以序列化的参数?

It is throwing an exception because it is trying to serialize and persist all the workflow arguments. Is there a way to get the serializer to persist only those arguments that can be serialized?

推荐答案

Rory,

有可能;)

您唯一无法更改的代码是您的类,这些类无法持久.将NonSerialized服装添加到无法持久的元素上:

the only code you have ot change is your class that can't persiste. Add the NonSerialized attibut on elements that can't persist:

msdn.microsoft/en-us/library/system.nonserializedattribute .aspx

更多推荐

如何使用不可序列化的参数持久化工作流程

本文发布于:2023-10-26 07:09:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1529432.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何使用   持久   流程   参数   序列化

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!