예제 #1
0
        static void Main(string[] args)
        {
            Logger.LogFile = Constants.StrLogFile;

            ArgumentManager.ParseArguments(args);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new NewMainHandler());
        }
예제 #2
0
        static void Main(string[] args)
        {
            Console.Out.WriteLine("Cha0s Data Tools - SDK Wrapper");
            Console.Out.WriteLine("==============================");

            try
            {
                CrmServiceClient service   = null;
                Arguments        arguments = ArgumentManager.ParseArguments(args);

                if (!string.IsNullOrWhiteSpace(arguments.ConnectionString))
                {
                    service = ServiceManager.CreateOrganizationService(arguments.ConnectionString);
                }
                else if (arguments.Url != null)
                {
                    service = ServiceManager.CreateOrganizationService(arguments.Url.ToString(), arguments.Username, arguments.Password);
                }

                switch (arguments.Action)
                {
                case "pluginassembly":
                    Console.Out.WriteLine("Register Plugin Assembly");
                    PluginManager.UpdateAssembly(service, arguments.Solution, arguments.AdditionalArgs.First());
                    Console.Out.WriteLine("Completed Plugin Assembly Registration");
                    break;


                default:
                    Console.Out.WriteLine("Unrecognized command, exiting...");
                    break;
                }
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine(ex.ToString());
            }
        }