public void MakeSureConstructorPublic()
 {
     Assert.Throws <FudgeRuntimeException>(() =>
     {
         var surrogate = new SerializableSurrogate(typeof(Class2));
     });
 }
 private Func <FudgeContext, TypeData, IFudgeSerializationSurrogate>[] BuildSelectorList()
 {
     // This is the list of potential surrogates, in the order that they are tested
     return(new Func <FudgeContext, TypeData, IFudgeSerializationSurrogate>[]
     {
         this.SurrogateFromAttribute,
         (c, td) => SerializableSurrogate.CanHandle(td) ? new SerializableSurrogate(td.Type) : null,
         (c, td) => ArraySurrogate.CanHandle(td) ? new ArraySurrogate(c, td) : null,
         (c, td) => DictionarySurrogate.CanHandle(td) ? new DictionarySurrogate(c, td) : null,
         (c, td) => ListSurrogate.CanHandle(td) ? new ListSurrogate(c, td) : null,
         (c, td) => ToFromFudgeMsgSurrogate.CanHandle(td) ? new ToFromFudgeMsgSurrogate(c, td) : null,
         (c, td) => DataContractSurrogate.CanHandle(td) ? new DataContractSurrogate(c, td) : null,
         (c, td) => DotNetSerializableSurrogate.CanHandle(td) ? new DotNetSerializableSurrogate(c, td) : null,
         this.SurrogateFromDotNetSurrogateSelector,
         (c, td) => SerializableAttributeSurrogate.CanHandle(td) ? new SerializableAttributeSurrogate(c, td) : null,
         (c, td) => PropertyBasedSerializationSurrogate.CanHandle(td) ? new PropertyBasedSerializationSurrogate(c, td) : null,
         (c, td) => ImmutableSurrogate.CanHandle(td) ? new ImmutableSurrogate(c, td) : null,
     });
 }
 public void HappyDayStory()
 {
     var surrogate = new SerializableSurrogate(typeof(Class0));
 }