예제 #1
0
 private byte[] method_1(LanguageEntry languageEntry_0)
 {
     global::System.IO.MemoryStream memoryStream = new global::System.IO.MemoryStream();
     memoryStream.WriteByte(0);
     this.class47_0.method_10(513, memoryStream);
     this.class47_0.method_12(languageEntry_0.Name, memoryStream);
     this.class47_0.method_10(languageEntry_0.Messages.Count, memoryStream);
     foreach (MessageEntry messageEntry in languageEntry_0.Messages)
     {
         this.class47_0.method_12(messageEntry.Message, memoryStream);
     }
     return(memoryStream.ToArray());
 }
예제 #2
0
        public LanguagesContainer Parse(LanguagesContainer lc, global::System.IO.Stream s)
        {
            this.class47_0.method_4(s);
            int num = this.class47_0.method_4(s);

            s.ReadByte();
            int num2 = this.class47_0.method_4(s);

            int[] array = new int[num2];
            for (int i = 0; i < num2; i++)
            {
                array[i] = this.class47_0.method_4(s);
            }
            lc.Indexes = array;
            global::System.Collections.Generic.Dictionary <string, LanguageEntry> dictionary = new global::System.Collections.Generic.Dictionary <string, LanguageEntry>();
            for (int j = 0; j < num; j++)
            {
                string        text  = this.class47_0.method_7(s);
                int           size  = this.class47_0.method_4(s);
                LanguageEntry value = new LanguageEntry(text, size);
                dictionary.Add(text, value);
            }
            for (int k = 0; k < num; k++)
            {
                s.ReadByte();
                this.class47_0.method_4(s);
                string        key           = this.class47_0.method_7(s);
                int           num3          = this.class47_0.method_4(s);
                LanguageEntry languageEntry = dictionary[key];
                for (int l = 0; l < num3; l++)
                {
                    string message = this.class47_0.method_7(s);
                    languageEntry.Messages.Add(new MessageEntry(message));
                }
            }
            lc.Languages = dictionary;
            return(lc);
        }