示例#1
0
        private void Initialize()
        {
            if (!initialized)
            {
                var args = System.Environment.GetCommandLineArgs();
                if (args == null || args.Length == 0)
                {
                    Console.WriteLine(NO_SOLUTION_MESSAGE);
                    initialized = true;
                }

                var solution = (from a in args where a.ToLower().StartsWith("/solution:") select a).SingleOrDefault();
                if (solution == null)
                {
                    Console.WriteLine(NO_SOLUTION_MESSAGE);
                    initialized = true;
                    return;
                }

                var name = solution.Substring(10);

                this.solution = (from s in uow.Solutions.GetQuery()
                                 where s.UniqueName == name ||
                                 s.FriendlyName == name
                                 select s).SingleOrDefault();

                if (solution == null)
                {
                    Console.WriteLine($"Solution with name {name} was not found. Components will not be attached to a solution.");
                }

                initialized = true;
            }
        }
示例#2
0
 public Entities.Solution CreateNewSolution(Entities.User user, Entities.Solution solution)
 {
     return(manager.HPService.CreateNewSolution(user, solution).GetResult());
 }
示例#3
0
 public Entities.ResultValue <Entities.Solution> CreateNewSolution(Entities.User user, Entities.Solution solution)
 {
     return(base.Channel.CreateNewSolution(user, solution));
 }