public static void GetTypeMap( IEnumerable<TypeMap> typeMapList, IEnumerable<CSTypeMap> csTypeMapList, out CSTypeMap csTypeMap, 
     out TypeMap typeMap, string type, bool isArray)
 {
     var _typeMap = typeMapList.FirstOrDefault( map => map.GLName == type );
     typeMap = _typeMap;
     if (_typeMap == null) throw new Exception( "Unknow return type: " + type );
     if (_typeMap.LanguageName.Name == "*")
     {
         csTypeMap = null;
         return;
     }
     csTypeMap = csTypeMapList.FirstOrDefault( map1 => map1.GLName == _typeMap.LanguageName.Name );
     if (csTypeMap.LanguageName == "char" && (_typeMap.LanguageName.PointDeep == 1 || isArray))
     {
         csTypeMap = new CSTypeMap { GLName = "GLchar", LanguageName = "string", Attributes = new string[0] };
         if (_typeMap.LanguageName.PointDeep == 1) _typeMap.LanguageName.PointDeep--;
     }
     if (csTypeMap == null) throw new Exception( "Unknow CS type: " + _typeMap.LanguageName.Name );
 }
 public static void GetTypeMap( this ReturnFunctionOption returnFunctionOption, 
     IEnumerable<TypeMap> typeMapList, IEnumerable<CSTypeMap> csTypeMapList, out CSTypeMap csTypeMap,
     out TypeMap typeMap)
 {
     GetTypeMap( typeMapList, csTypeMapList, out csTypeMap, out typeMap, returnFunctionOption.ReturnType, false );
 }
 public static void GetTypeMap( this ParamFunctionOption paramFunctionOption, 
     IEnumerable<TypeMap> typeMapList, IEnumerable<CSTypeMap> csTypeMapList, out CSTypeMap csTypeMap,
     out TypeMap typeMap)
 {
     GetTypeMap( typeMapList, csTypeMapList, out csTypeMap, out typeMap, paramFunctionOption.ParamType,
                 paramFunctionOption is ArrayParamFunctionOption );
 }