コード例 #1
0
        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]);
        }
コード例 #2
0
 public LocalCompilationContext(Type type, GlobalCompilationContext globalContext)
 {
     this.globalContext        = globalContext;
     this.serializationMethods = new SerializationMethodsWithDependencies();
     this.type = type;
 }