public EventsController(IUserProcessor userProcessor, INewsRepository newsRepository, INotifier notifier, IProjectProcessor projectProcessor)
 {
     this.userProcessor = userProcessor;
     this.newsRepository = newsRepository;
     this.notifier = notifier;
     this.projectProcessor = projectProcessor;
 }
Ejemplo n.º 2
0
 public SolutionProcessor(ILog log, ILanguageService languageService, IShellProjectService shellProjectService,
                          IProjectProcessor projectProcessor)
 {
     _log                 = log;
     _languageService     = languageService;
     _shellProjectService = shellProjectService;
     _projectProcessor    = projectProcessor;
 }
        public ProjectType(string codeExtension, string projectExtension, Guid projectTypeGuid, string sampleCode = "", IProjectProcessor[] postProcess = null) {
            Debug.Assert(!String.IsNullOrWhiteSpace(codeExtension));

            CodeExtension = codeExtension;
            ProjectExtension = projectExtension;
            SampleCode = sampleCode;
            ProjectTypeGuid = projectTypeGuid;
            Processors = postProcess ?? new IProjectProcessor[0];
        }
 public LandingController(IProjectRepository projectRepository, IUserRepository userRepository, 
     ITaskProcessor taskProcessor, IStringExtensions stringExtensions, IProjectProcessor projectProcessor, 
     INotifier notifier, INewsProcessor newsProcessor)
 {
     this.projectRepository = projectRepository;
     this.userRepository = userRepository;
     this.taskProcessor = taskProcessor;
     this.stringExtensions = stringExtensions;
     this.projectProcessor = projectProcessor;
     this.notifier = notifier;
     this.newsProcessor = newsProcessor;
 }
Ejemplo n.º 5
0
        static void Main(string[] args)
        {
            if (args.Length < 2)
            {
                WriteHelp();
                return;
            }

            var basePath       = args[0];
            var outputBasePath = args[1];

            string[] projectFiles;
            if (Directory.Exists(basePath))
            {
                projectFiles = Directory.EnumerateFiles(basePath, $"*{ProjectExtension.CS}", SearchOption.AllDirectories).OrderBy(file => file)
                               .Union(Directory.EnumerateFiles(basePath, $"*{ProjectExtension.VB}", SearchOption.AllDirectories).OrderBy(file => file)).ToArray();
            }
            else
            {
                WriteHelp();
                return;
            }

            var processors = new IProjectProcessor[] {
                new CSharpProjectProcessor(),
                new VisualBasicProjectProcessor()
            };

            foreach (var projectFilePath in projectFiles)
            {
                var projectPath         = Path.GetDirectoryName(projectFilePath);
                var projectBasePath     = Path.GetDirectoryName(projectPath) + Path.DirectorySeparatorChar;
                var projectRelativePath = projectPath.TrimStart(basePath + Path.DirectorySeparatorChar);
                var outputPath          = Path.Combine(outputBasePath, Path.GetFileNameWithoutExtension(projectFilePath) + PoWriter.PortaleObjectTemplateExtension);

                var strings = new LocalizableStringCollection();
                foreach (var processor in processors)
                {
                    processor.Process(projectPath, projectBasePath, strings);
                }

                if (strings.Values.Any())
                {
                    Directory.CreateDirectory(Path.GetDirectoryName(outputPath));

                    using (var potFile = new PoWriter(outputPath)) {
                        potFile.WriteRecord(strings.Values);
                    }
                }

                Console.WriteLine($"{Path.GetFileName(projectPath)}: Found {strings.Values.Count()} strings.");
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="AccountController"/> class.
 /// </summary>
 /// <param name="userProcessor">
 /// The user processor.
 /// </param>
 /// <param name="projectProcessor">
 /// The project processor.
 /// </param>
 public AccountController(IUserProcessor userProcessor, IProjectProcessor projectProcessor)
 {
     this.userProcessor = userProcessor;
     this.projectProcessor = projectProcessor;
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProjectController"/> class.
 /// </summary>
 /// <param name="processor">The processor.</param>
 public ProjectController(IProjectProcessor processor)
 {
     _processor = processor;
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProjectController"/> class.
 /// </summary>
 public ProjectController()
 {
     _processor = new ProjectProcessor();
 }
 public NewsProcessor(INotifier notifier, INewsRepository newsRepository, IProjectProcessor projectProcessor)
 {
     this.notifier = notifier;
     this.newsRepository = newsRepository;
     this.projectProcessor = projectProcessor;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ProjectController"/> class.
 /// </summary>
 /// <param name="taskProcessor">
 /// The task processor.
 /// </param>
 /// <param name="userProcessor">
 /// The user processor.
 /// </param>
 /// <param name="projectProcessor">
 /// The project processor.
 /// </param>
 /// <param name="notifier">
 /// The notifier.
 /// </param>
 /// <param name="newsProcessor">
 /// The news processor.
 /// </param>
 /// <param name="stringExtensions">
 /// The string extensions.
 /// </param>
 /// <param name="reminderProcessor">
 /// The reminder processor.
 /// </param>
 public ProjectController(ITaskProcessor taskProcessor, IUserProcessor userProcessor, IProjectProcessor projectProcessor, 
     INotifier notifier, INewsProcessor newsProcessor, IStringExtensions stringExtensions, IReminderProcessor reminderProcessor)
 {
     this.projectProcessor = projectProcessor;
     this.notifier = notifier;
     this.taskProcessor = taskProcessor;
     this.userProcessor = userProcessor;
     this.newsProcessor = newsProcessor;
     this.stringExtensions = stringExtensions;
     this.reminderProcessor = reminderProcessor;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ProfileController"/> class.
 /// </summary>
 /// <param name="userProcessor">
 /// The user processor.
 /// </param>
 /// <param name="projectProcessor">
 /// The project processor.
 /// </param>
 /// <param name="userRepository">
 /// The user repository.
 /// </param>
 public ProfileController(IUserProcessor userProcessor, IProjectProcessor projectProcessor)
 {
     this.userProcessor = userProcessor;
     this.projectProcessor = projectProcessor;
 }
Ejemplo n.º 12
0
 public DocumentationGenerator(IProjectProcessor processor, IRenderer renderer)
 {
     _projectProcessor = processor;
     _rendererService  = renderer;
 }