Esempio n. 1
0
        public void NavigationConnectToLinker(LinkerComponent linker)
        {
            var nav = linker.Get <IWindowNavigation>();

            if (nav != null)
            {
                nav.SetNavigation(this.navigation);
            }
        }
Esempio n. 2
0
        private static ExecutableComponent ParseLinkAction(Action action)
        {
            ExecutableComponent output = null;
            Linker linker;

            if (Linkers.ContainsKey(action.CommandPath))
            {
                linker = Linkers[action.CommandPath];
            }
            else
            {
                linker = new Linker(action.CommandPath);
                Linkers[action.CommandPath] = linker;
            }

            var linkerFound = false;

            if (Linker.IsKnownLinker(action.CommandPath))
            {
                var inputMatchesRegex     = Regex.Matches(action.CommandArguments, linker.InputFileRegex, RegexOptions.IgnoreCase);
                var importLibMatchesRegex = Regex.Matches(action.CommandArguments, linker.ImportLibraryRegex, RegexOptions.IgnoreCase);
                var outputMatchesRegex    = Regex.Matches(action.CommandArguments, linker.OutputFileRegex, RegexOptions.IgnoreCase);
                var inputMatches          = inputMatchesRegex.Cast <Match>().Where(n => linker.AllowedInputTypes.Any(a => n.Value.EndsWith(a))).ToList();
                var outputMatches         = outputMatchesRegex.Cast <Match>().Where(n => linker.AllowedOutputTypes.Any(a => n.Value.EndsWith(a))).ToList();
                var importMatches         = importLibMatchesRegex.Cast <Match>().ToList();

                if (inputMatches.Count > 0 && outputMatches.Count == 1)
                {
                    linkerFound = true;
                    output      = new LinkerComponent()
                    {
                        Action        = action,
                        Linker        = linker,
                        Arguments     = action.CommandArguments,
                        OutputLibrary = outputMatches[0].Value,
                        ImportLibrary = importMatches.Count > 0 ? importMatches[0].Value : null,
                        Inputs        = inputMatches.Select(n => n.Value).ToList(),
                        LocalOnly     = !action.bCanExecuteRemotely
                    };
                }
            }

            if (!linkerFound)
            {
                output = new ExecutableComponent()
                {
                    Action    = action,
                    Arguments = action.CommandArguments,
                    Linker    = linker
                };
            }
            return(output);
        }
		public void NavigationConnectToLinker(LinkerComponent linker) {

			var nav = linker.Get<IWindowNavigation>();
			this.NavigateCopyTo(nav);

		}
        public void NavigationConnectToLinker(LinkerComponent linker)
        {
            var nav = linker.Get <IWindowNavigation>();

            this.NavigateCopyTo(nav);
        }