public KMP(byte[] Data) { EndianBinaryReaderEx er = new EndianBinaryReaderEx(new MemoryStream(Data), Endianness.LittleEndian); try { Header = new KMPHeader(er); foreach (var v in Header.SectionOffsets) { er.BaseStream.Position = Header.HeaderSize + v; String sig = er.ReadString(Encoding.ASCII, 4); er.BaseStream.Position -= 4; switch (sig) { case "TPTK": KartPoint = new KTPT(er); break; case "TPNE": EnemyPoint = new ENPT(er); break; case "HPNE": EnemyPointPath = new ENPH(er); break; case "TPTI": ItemPoint = new ITPT(er); break; case "HPTI": ItemPointPath = new ITPH(er); break; case "TPKC": CheckPoint = new CKPT(er); break; case "HPKC": CheckPointPath = new CKPH(er); break; case "JBOG": GlobalObject = new GOBJ(er); break; case "ITOP": PointInfo = new POTI(er); break; case "AERA": Area = new AREA(er); break; case "EMAC": Camera = new CAME(er); break; case "TPGJ": JugemPoint = new JGPT(er); break; case "TPNC": CannonPoint = new CNPT(er); break; case "TPSM": MissionPoint = new MSPT(er); break; case "IGTS": StageInfo = new STGI(er); break; case "SROC": CourseSect = new CORS(er); break; case "TPLG": GliderPoint = new GLPT(er); break; case "HPLG": GliderPointPath = new GLPH(er); break; default: continue; } } } finally { er.Close(); } }
public void ConfigureServices(IServiceCollection services) { services.AddDirectoryBrowser(); services.AddSignalR(); services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); AuthenticationConfig.AuthenticationConfigServices(services, Configuration); CORS.CORSServices(services); DependencyInjection.DependencyInjectionServices(services); Swagger.StartUpSwaggerConfigureServices(services); }