public static AbcFile From(AbcFileInfo fileInfo) { var res = new AbcFile { MajorVersion = fileInfo.MajorVersion, MinorVersion = fileInfo.MinorVersion }; var loader = new AbcFileLoader(fileInfo); loader.SaveTo(res); return res; }
public void SaveTo(AbcFile file) { foreach (var method in Methods) { file.Methods.Add(method); } foreach (var @class in Classes) { file.Classes.Add(@class); } foreach (var script in Scripts) { file.Scripts.Add(script); } }