Ejemplo n.º 1
0
 public bool LoadFromCsvFile(string fileName)
 {
     dataMap.Clear();
     try{
         ByteReader reader = ByteReader.Open(fileName);
         int        line   = 0;
         for (; ;)
         {
             BetterList <string> temp = reader.ReadCSV();
             if (temp == null || temp.size == 0)
             {
                 break;
             }
             if (line > 2)
             {
                 language newData = new language();
                 newData.ReadFrom(temp);
                 dataMap.Add(newData.Key, newData);
             }
             line++;
         }
     }catch (Exception e) {
         return(false);
     }
     return(dataMap.Count > 0);
 }
Ejemplo n.º 2
0
 static public int Open_s(IntPtr l)
 {
     try {
         System.String a1;
         checkType(l, 1, out a1);
         var ret = ByteReader.Open(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 3
0
 public unsafe static long $Invoke1(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(ByteReader.Open(Marshal.PtrToStringUni(*(IntPtr *)args))));
 }