// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Home/Error"); // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseRouting(); //app.UseAuthorization(); SObjects.Init(env.ContentRootPath + "/wwwroot/"); app.UseEndpoints(endpoints => { endpoints.MapControllerRoute( name: "default", pattern: "{controller=Home}/{action=Index}/{id?}"); }); }
public static void Init(string pth) { path = pth; OAData.Ontology.Init(path + "ontology_iis-v12-doc_ruen.xml"); OAData.OADB.Init(path); if (OAData.OADB.firsttime) { OAData.OADB.Load(); } XElement fondy = SObjects.SearchByName(funds_name) .FirstOrDefault(x => SObjects.GetField(x, "http://fogid.net/o/name") == "Фонды"); if (fondy != null) { XElement format_funds_coll = new XElement("record", new XAttribute("type", "http://fogid.net/o/collection"), new XElement("field", new XAttribute("prop", "http://fogid.net/o/name")), new XElement("inverse", new XAttribute("prop", "http://fogid.net/o/in-collection"), new XElement("record", new XAttribute("type", "http://fogid.net/o/collection-member"), new XElement("direct", new XAttribute("prop", "http://fogid.net/o/collection-item"), new XElement("record", new XAttribute("type", "http://fogid.net/o/collection"), new XElement("field", new XAttribute("prop", "http://fogid.net/o/name")), new XElement("inverse", new XAttribute("prop", "http://fogid.net/o/reflected"), new XElement("record", new XAttribute("type", "http://fogid.net/o/reflection"), new XElement("direct", new XAttribute("prop", "http://fogid.net/o/in-doc"), new XElement("record", new XAttribute("type", "http://fogid.net/o/photo-doc"), new XElement("field", new XAttribute("prop", "http://fogid.net/o/uri")), new XElement("inverse", new XAttribute("prop", "http://fogid.net/o/forDocument"), new XElement("record", new XAttribute("type", "http://fogid.net/o/FileStore"), new XElement("field", new XAttribute("prop", "http://fogid.net/o/uri")))) )))), null))))); funds_id = fondy.Attribute("id").Value; XElement funds_coll = SObjects.GetItemById(funds_id, format_funds_coll); funds = funds_coll.Elements("inverse") .Select((XElement inv) => inv.Element("record").Element("direct").Element("record")).ToArray(); } else { funds = new XElement[0]; } //string fund_id = funds.First().Attribute("id").Value; comparedates = new SCompare(); }