コード例 #1
0
        private static void Main(string[] args)
        {
            Console.WriteLine($"FAA web scraper {AssemblyInfo.GetAssemblyVersion()}");
            Console.WriteLine();

            var p = new FluentCommandLineParser <ApplicationArguments>();

            p.Setup(arg => arg.Site).As('s', "site").Required();
            p.Setup(arg => arg.Directory).As('d', "directory").Required();
            p.Setup(arg => arg.Force).As("force");

            var result = p.Parse(args);

            if (result.HasErrors == false)
            {
                var container = IoC.RegisterDependencies();
                OutputSettings(container);
                container.Resolve <Application>().Run(p.Object);
            }
            else
            {
                Console.Write($" Usage: {AssemblyInfo.GetExeName()}");
                foreach (var option in p.Options.Where(x => x.IsRequired))
                {
                    Console.Write($" /{option.ShortName} <{option.LongName}>");
                }

                Console.WriteLine();
                Console.WriteLine(" Site : PRE, PROD");
                Console.WriteLine();
                Console.WriteLine();
                Console.WriteLine(result.ErrorText);
            }
        }
コード例 #2
0
 static Connection()
 {
     UserAgentString = String.Format("ShippingEasy .NET Client: {0}/{1} ({2} {3})",
                                     AssemblyInfo.GetAssemblyName(),
                                     AssemblyInfo.GetAssemblyVersion(),
                                     AssemblyInfo.GetFileVersion(),
                                     AssemblyInfo.GetCommitIdentifier());
 }
コード例 #3
0
ファイル: GetAssemblyVersion.cs プロジェクト: eitan-j/keysndr
 public void Execute()
 {
     Result = new ApiResult <string>
     {
         Content = AssemblyInfo.GetAssemblyVersion(typeof(KeySndrApp)).ToString(),
         Message = "OK",
         Success = true
     };
 }
コード例 #4
0
        private void WriteWelcome()
        {
            AddEntry("KeySndr Win version " + AssemblyInfo.GetAssemblyVersion(typeof(Form1)).ToString());
            AddEntry("KeySndr Base version " + AssemblyInfo.GetAssemblyVersion(typeof(KeySndrApp)).ToString());

            var appConfigProvider = ObjectFactory.GetProvider <IAppConfigProvider>();
            var appConfig         = appConfigProvider.AppConfig;

            AddEntry($"Admin interface at http://localhost:{appConfig.LastPort}/manage/index.html");
        }
コード例 #5
0
        public void ReturnsCorrect()
        {
            var t = AssemblyInfo.GetAssemblyVersion(typeof(KeySndrApp));

            Assert.IsNotNull(t);
        }
コード例 #6
0
 private void SetupInterface()
 {
     Text += $" {AssemblyInfo.GetAssemblyVersion(typeof (Form1))}";
     Text += $" (Base lib {AssemblyInfo.GetAssemblyVersion(typeof (KeySndrApp))})";
 }