private static Type CodeGeneratePropertySerializer(Type propertyClassType) { CodeGenerationBuilder codeGenerationBuilder = new CodeGenerationBuilder("PropertySerializer: " + propertyClassType.FullName); PropertySerializerTypeCodeGenerator.AddPropertySerializerTypeCode(codeGenerationBuilder, propertyClassType); IEnumerable <Type> types = CodeGenerationManager.CompileRuntimeTempTypes(codeGenerationBuilder); return(types.Single()); }
private static Type GetPropertySerializerType(Type propertyClassType) { string propertySerializerTypeName = PropertySerializerTypeCodeGenerator.CreateSerializerClassFullName(propertyClassType); Type propertySerializerType = TypeManager.TryGetType(propertySerializerTypeName); if (propertySerializerType == null) { propertySerializerType = CodeGeneratePropertySerializer(propertyClassType); } return(propertySerializerType); }