public pinacolada() { load += Logading; Autoryzacja += Autoryzuj; Zapis += ZapiszPlik; UDodaj += Dodawanie; }
public ProductListResponse GetList([FromBody] Aut aut) { if (aut.userName != "bulut" || aut.password != "123") { return(new ProductListResponse { status = new Status() { code = Enums.MessageCode.Basarisiz, message = "Erişim Engellendi!" }, productList = null }); } else { return(new ProductListResponse { status = new Status() { code = Enums.MessageCode.Basarili, message = "Başarılı!" }, productList = productService.GetListQueryAble() }); } }
public List <Entity.Models.Category> GetList([FromBody] Aut aut) { if (aut.userName == "bulut" || aut.password == "123") { return(productService.GetList()); } else { return(null); } }
public void StartAut() { Aut.Start(); ElapsedTime.Start(); if (SystemInfo.GetAffinity() != null) { Aut.ProcessorAffinity = SystemInfo.GetAffinity().Value; } Aut.PriorityClass = Enum.Parse <ProcessPriorityClass>(ArgumentParser.AutPriority); Aut.BeginOutputReadLine(); Aut.BeginErrorReadLine(); log.Info($"AUT has been started. Starting time: {Aut.StartTime}"); log.Info($"AUT Input arguments: {AutStartInfo.Arguments}"); log.Info($"AUT Main Thread ID: {Aut.Id}"); log.Info($"AUT Process priority: {Aut.PriorityClass}"); }
public static Journal asd( ) { var assembly = Assembly.GetExecutingAssembly( ); var stream = assembly.GetManifestResourceStream(@"Our4LegendData.xml"); if (stream == null) { throw new Exception( ); } var Reader = new StreamReader(stream); var Doc = XDocument.Parse(Reader.ReadToEnd( )); var journal = (from Jou in Doc.Descendants("Journal") select new Journal { Name = ( string )Jou.Attribute("Name"), ListOfIssue = from Iss in Jou.Descendants("Issue") select new Issue { Number = ( long )Iss.Attribute("Number"), PublishTime = Convert.ToDateTime(Iss.Attribute("PublishTime")), Price = ( decimal )Iss.Attribute("Price"), ListOfArticle = from Art in Iss.Descendants("Article") select new Article { Title = ( string )Art.Attribute("Title"), Text = ( string )Art.Attribute("Text"), ListOfAuthor = from Aut in Art.Descendants("Author") select new Author { FirstName = ( string )Aut.Attribute("FirstName"), FamilyName = ( string )Aut.Attribute("FamilyName"), EmailAddress = ( string )Aut.Attribute("EmailAddress") } } } }).FirstOrDefault( ); return(journal); }
public Class1() { load += Log; a += autoryz; }
public static Journal GetJournal(IRandomAccessStream stream) { if (stream == null) { return(null); } else { var Reader = new StreamReader(stream.AsStream()); var Doc = XDocument.Parse(Reader.ReadToEnd()); Journal journal; try { journal = (from Jou in Doc.Descendants("Journal") select new Journal { Name = ( string )Jou.Attribute("Name"), ListOfAuthor = from Aut in Jou.Descendants("Author") select new Author { FirstName = ( string )Aut.Attribute("FirstName"), FamilyName = ( string )Aut.Attribute("FamilyName"), EmailAddress = ( string )Aut.Attribute("EmailAddress"), Introduction = ( string )Aut.Attribute("Introduction") }, ListOfIssue = from Iss in Jou.Descendants("Issue") select new Issue { Number = ( long )Iss.Attribute("Number"), PublishTime = Convert.ToDateTime(( string )Iss.Attribute("PublishTime")), Price = ( decimal )Iss.Attribute("Price"), ListOfArticle = from Art in Iss.Descendants("Article") select new Article { Title = ( string )Art.Attribute("Title"), TextLine = from Lin in Art.Descendants("Text").FirstOrDefault().Descendants("Line") select(string) Lin.Attribute("Run"), ListOfAuthorName = from Aut in Art.Descendants("AuthorName") select(string) Aut.Attribute("FirstName") + " " + ( string )Aut.Attribute("FamilyName"), } } }).First(); } catch (System.Exception) { return(null); } foreach (var Aut in journal.ListOfAuthor) { foreach (var Iss in journal.ListOfIssue) { foreach (var Art in Iss.ListOfArticle) { foreach (var aut in Art.ListOfAuthor) { if (Aut == aut) { Aut.ArticleHaveContribute.Add(Art); } } } } } return(journal); } }