예제 #1
0
        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);
        }
예제 #2
0
 public Connection(Parametry p)
 {
     _parametry = p;
 }