0 votes
in Microsoft Bot Framework by

How can I reference non-serializable services from my C# dialogs in SDK v3?

1 Answer

0 votes
by

There are multiple options:

  • Resolve the dependency through Autofac and FiberModule.Key_DoNotSerialize. This is the cleanest solution.
  • Use NonSerialized and OnDeserialized attributes to restore the dependency on deserialization. This is the simplest solution.
  • Do not store that dependency, so that it won't be serialized. This solution, while technically feasible, is not recommended.
  • Use the reflection serialization surrogate. This solution may not be feasible in some cases and risks serializing too much.

Related questions

0 votes
asked Dec 18, 2021 in Microsoft Bot Framework by rajeshsharma
+1 vote
asked Jan 22, 2022 in APIGEE - API Services by Robindeniel
...