public sealed class SurrogateSelector : System.Runtime.Serialization.SurrogateSelector, System.Runtime.Serialization.ISurrogateSelector
{
System.Runtime.Serialization.ISerializationSurrogate ISS = System.Runtime.Serialization.FormatterServices.GetSurrogateForCyclicalReference(new SerializationSurrogate());
public SurrogateSelector()
{
foreach (Type t in typeof(NameSpace.ASampleClass).Assembly.GetTypes())
{
if (t.Namespace == "NameSpace")
this.AddSurrogate(t, new System.Runtime.Serialization.StreamingContext(System.Runtime.Serialization.StreamingContextStates.All), ISS);
}
}
}
{System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. at System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark) at System.Reflection.Assembly.GetTypes() at NameSpace.SurrogateSelector..ctor() in D:\Projects\Esfand\Esfand\classname.cs:line 2661}