public static dynamic GetTSObject(Level[] dynArray)
            {
                if (dynArray is null)
                {
                    return(null);
                }
                var list = new System.Collections.Generic.List <dynamic>();

                foreach (var dynItem in dynArray)
                {
                    list.Add(Level_.GetTSObject(dynItem));
                }
                return(list.ToArray());
            }
            public static Level[] FromTSObject(dynamic[] tsArray)
            {
                if (tsArray is null)
                {
                    return(null);
                }
                var list = new System.Collections.Generic.List <Level>();

                foreach (var tsItem in tsArray)
                {
                    list.Add(Level_.FromTSObject(tsItem));
                }
                return(list.ToArray());
            }
Esempio n. 3
0
 private static void DumpFilesToLevel(string path)
 {
     string[] lines = File.ReadAllLines(path);
     for (int i = 0; i < lines.Length; i++)
     {
         string[] tmpString = lines[i].Split('\t');
         Level_   tmp       = new Level_();
         tmp.Level      = Convert.ToByte(tmpString[0]);
         tmp.Experience = Convert.ToUInt64(tmpString[1]);
         if (tmp.Level == 1)
         {
             tmp.Skillpoints = 0;
         }
         else
         {
             tmp.Skillpoints = Convert.ToUInt64(tmpString[2]);
         }
         LevelData.Add(tmp);
     }
 }
                public override int GetHashCode()
                {
                    int hash = 1;

                    if (Level_ != 0)
                    {
                        hash ^= Level_.GetHashCode();
                    }
                    if (bid_ != null)
                    {
                        hash ^= Bid.GetHashCode();
                    }
                    if (ask_ != null)
                    {
                        hash ^= Ask.GetHashCode();
                    }
                    if (_unknownFields != null)
                    {
                        hash ^= _unknownFields.GetHashCode();
                    }
                    return(hash);
                }
Esempio n. 5
0
 private static void DumpFilesToLevel(string path)
 {
     string[] lines = File.ReadAllLines(path);
     for (int i = 0; i < lines.Length; i++)
     {
         string[] tmpString = lines[i].Split('\t');
         Level_ tmp = new Level_();
         tmp.Level = Convert.ToByte(tmpString[0]);
         tmp.Experience = Convert.ToUInt64(tmpString[1]);
         if (tmp.Level == 1)
             tmp.Skillpoints = 0;
         else
             tmp.Skillpoints = Convert.ToUInt64(tmpString[2]);
         LevelData.Add(tmp);
     }
 }