Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Web .Config</p> <pre><code>&lt;applicationSettings&gt; &lt;HostProcess.Properties.Settings&gt; &lt;setting name="KnowTypes" serializeAs="Xml"&gt; &lt;value&gt; &lt;ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; &lt;string&gt;a.AOrder,a&lt;/string&gt; &lt;string&gt;b.BOrder,b&lt;/string&gt; &lt;string&gt;c.COrder,c&lt;/string&gt; &lt;/ArrayOfString&gt; &lt;/value&gt; &lt;/setting&gt; &lt;/HostProcess.Properties.Settings&gt; </code></pre> <p></p> <pre><code>static class Helper { public static IEnumerable&lt;Type&gt; GetKnownTypes(ICustomAttributeProvider provider) { System.Collections.Generic.List&lt;System.Type&gt; knownTypes = new System.Collections.Generic.List&lt;System.Type&gt;(); // Add any types to include here. Properties.Settings.Default.KnowTypes.Cast&lt;string&gt;().ToList().ForEach(type =&gt; { knownTypes.Add(Type.GetType(type)); }); return knownTypes; } } [ServiceContract] [ServiceKnownType("GetKnownTypes", typeof(Helper))] public interface IOrderProcessor { [OperationContract] string ProcessOrder(Order order); } </code></pre> <hr> <p>The Order is the abstract base class </p> <hr> <pre><code>[DataContract] public abstract class Order { public Order() { OrderDate = DateTime.Now; } [DataMember] public string OrderID { get; set; } [DataMember] public DateTime OrderDate { get; set; } [DataMember] public string FirstName { get; set; } [DataMember] public string LastName { get; set; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload