コード例 #1
0
ファイル: SerReader.cs プロジェクト: sirkiller95/adsas
        public string ReadAndFixString()
        {
            string str  = ReadMarkString();
            string str2 = _repackContext.FixStr(str);

            if (str != str2)
            {
                TransferMarked();
                writer.Write(str2);
            }
            return(str);
        }
コード例 #2
0
        public bool Process(AssemblyDefinition containingAssembly, Res resource, ResReader resourceReader, ResourceWriter resourceWriter)
        {
            if (!resource.IsString)
            {
                return(false);
            }

            string content = (string)resourceReader.GetObject(resource);

            content = _repackContext.FixStr(content);
            resourceWriter.AddResource(resource.name, content);

            return(true);
        }
コード例 #3
0
        public bool Process(AssemblyDefinition containingAssembly, Res resource, ResReader resourceReader, ResourceWriter resourceWriter)
        {
            string fix = _repackContext.FixStr(resource.type);

            if (fix == resource.type)
            {
                resourceWriter.AddResourceData(resource.name, resource.type, resource.data);
            }
            else
            {
                var output2 = new MemoryStream(resource.data.Length);
                var sr      = new SerReader(_repackContext, new MemoryStream(resource.data), output2);
                sr.Stream();
                resourceWriter.AddResourceData(resource.name, fix, output2.ToArray());
            }

            return(true);
        }