public SerializationMethodsBase GetSerializationMethods(Type type, bool withCache) { GlobalCompilationContext context = new GlobalCompilationContext(type, enableClassesTypes, ENABLE_LISTING); context.CompileAndCompose(); if (withCache) { foreach (KeyValuePair <Type, SerializationMethodsBase> pair in context.Dependencies) { Serializer.Cache(pair.Value, pair.Key); } } return(context.Dependencies[type]); }
public LocalCompilationContext(Type type, GlobalCompilationContext globalContext) { this.globalContext = globalContext; this.serializationMethods = new SerializationMethodsWithDependencies(); this.type = type; }