Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SourceControlModel" /> class.
        /// </summary>
        /// <param name="sourceControlPlugins">The source control plugins.</param>
        /// <param name="basePath">The base path.</param>
        /// <param name="manager">The manager.</param>
        /// <param name="service">The service.</param>
        public SourceControlModel(IEnumerable <ISourceVersionPlugin> sourceControlPlugins, string basePath, INotificationManager manager, ISonarRestService service)
        {
            this.service  = service;
            this.manager  = manager;
            this.basePath = basePath;
            this.plugins  = sourceControlPlugins;

            if (string.IsNullOrEmpty(basePath))
            {
                this.supportedPlugin = null;
                return;
            }

            foreach (var plugin in sourceControlPlugins)
            {
                try
                {
                    plugin.InitializeRepository(basePath);
                }
                catch (Exception ex)
                {
                    System.Diagnostics.Debug.WriteLine(ex.Message);
                }
            }

            this.supportedPlugin = this.GetSupportedPlugin();
        }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SourceControlModel" /> class.
        /// </summary>
        /// <param name="sourceControlPlugins">The source control plugins.</param>
        /// <param name="basePath">The base path.</param>
        public SourceControlModel(IEnumerable <ISourceVersionPlugin> sourceControlPlugins, string basePath)
        {
            this.basePath = basePath;
            this.plugins  = sourceControlPlugins;

            if (string.IsNullOrEmpty(basePath))
            {
                this.supportedPlugin = null;
                return;
            }

            foreach (var plugin in sourceControlPlugins)
            {
                plugin.InitializeRepository(basePath);
            }

            this.supportedPlugin = this.GetSupportedPlugin();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="SourceControlModel" /> class.
        /// </summary>
        /// <param name="sourceControlPlugins">The source control plugins.</param>
        /// <param name="basePath">The base path.</param>
        /// <param name="manager">The manager.</param>
        /// <param name="service">The service.</param>
        public SourceControlModel(IEnumerable<ISourceVersionPlugin> sourceControlPlugins, string basePath, INotificationManager manager, ISonarRestService service)
        {
            this.service = service;
            this.manager = manager;
            this.basePath = basePath;
            this.plugins = sourceControlPlugins;

            if (string.IsNullOrEmpty(basePath))
            {
                this.supportedPlugin = null;
                return;
            }

            foreach (var plugin in sourceControlPlugins)
            {

                try
                {
                    plugin.InitializeRepository(basePath);
                }
                catch (Exception ex)
                {
                    System.Diagnostics.Debug.WriteLine(ex.Message);
                }
            }

            this.supportedPlugin = this.GetSupportedPlugin();
        }