public Parametry GetParametry() { Parametry resoult = null; try { using (StreamReader sr = new StreamReader(System.IO.Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + "\\config\\config.yaml")) { var input = sr.ReadToEnd(); var deserializer = new DeserializerBuilder() .WithNamingConvention(new CamelCaseNamingConvention()).Build(); var rr = deserializer.Deserialize <Dokument>(input); resoult = rr.Parametry; } } catch (IOException e) { Console.WriteLine("Brak pliku config. ->" + e); } return(resoult); }
public Connection(Parametry p) { _parametry = p; }