Beispiel #1
0
        /// <summary>
        /// Returns the actual implementation for requested service interfaces
        /// </summary>
        public object GetService(Type serviceType)
        {
            if (serviceType == typeof(IAnalysisProvider))
            {
                if (m_analysisProvider == null)
                {
                    m_analysisProvider = new SubversionVCAnalysisProvider();
                }
                return(m_analysisProvider);
            }
            else if (serviceType == typeof(IVCDiffProvider))
            {
                if (m_vcDiffProvider == null)
                {
                    m_vcDiffProvider = new SubversionVCDiffProvider();
                }
                return(m_vcDiffProvider);
            }
            if (serviceType == typeof(IMigrationProvider))
            {
                if (m_migrationProvider == null)
                {
                    m_migrationProvider = new SubversionVCMigrationProvider();
                }
                return(m_migrationProvider);
            }


            return(null);
        }
 /// <summary>
 /// Check to see if an item is a sub item in cloak list.
 /// </summary>
 /// <param name="item"></param>
 /// <param name="cloakList"></param>
 /// <returns></returns>
 private bool isCloaked(IVCDiffProvider diffProvider, IVCDiffItem item, List <string> cloakList)
 {
     foreach (string cloakedPath in cloakList)
     {
         if (item.IsSubItemOf(cloakedPath))
         {
             return(true);
         }
     }
     return(false);
 }
 /// <summary>
 /// Return a service based on serviceType.
 /// </summary>
 /// <param name="serviceType"></param>
 /// <returns></returns>
 public object GetService(Type serviceType)
 {
     if (serviceType == typeof(IAnalysisProvider))
     {
         if (m_analysisProvider == null)
         {
             m_analysisProvider = new TfsFileSystemAnalysisProvider();
         }
         return(m_analysisProvider);
     }
     else if (serviceType == typeof(IServerPathTranslationService))
     {
         if (m_serverPathTranslationProvider == null)
         {
             m_serverPathTranslationProvider = new TfsFileSystemTranslationService();
         }
         return(m_serverPathTranslationProvider);
     }
     else if (serviceType == typeof(IMigrationProvider))
     {
         if (m_migrationProvider == null)
         {
             m_migrationProvider = new TfsFileSystemMigrationProvider();
         }
         return(m_migrationProvider);
     }
     else if (serviceType == typeof(IVCDiffProvider))
     {
         if (m_diffProvider == null)
         {
             m_diffProvider = new TfsFileSystemDiffProvider();
         }
         return(m_diffProvider);
     }
     else if (serviceType == typeof(ISyncMonitorProvider))
     {
         if (m_syncMonitorProvider == null)
         {
             m_syncMonitorProvider = new TfsFileSystemSyncMonitorProvider();
         }
         return(m_syncMonitorProvider);
     }
     else if (serviceType == typeof(IMigrationItemSerializer))
     {
         if (m_migrationItemSerializer == null)
         {
             m_migrationItemSerializer = new TfsFileSystemMigrationItemSerializer();
         }
         return(m_migrationItemSerializer);
     }
     return(null);
 }
Beispiel #4
0
        public object GetService(Type serviceType)
        {
            if (serviceType == typeof(IAnalysisProvider))
            {
                if (m_analysisProvider == null)
                {
                    m_analysisProvider = new TfsVCAnalysisProvider();
                }
                return(m_analysisProvider);
            }
            else if (serviceType == typeof(IMigrationProvider))
            {
                if (m_migrationProvider == null)
                {
                    m_migrationProvider = new TfsVCMigrationProvider();
                }
                return(m_migrationProvider);
            }
            else if (serviceType == typeof(IVCDiffProvider))
            {
                if (m_vcDiffProvider == null)
                {
                    m_vcDiffProvider = new TfsVCDiffProvider();
                }
                return(m_vcDiffProvider);
            }
            else if (serviceType == typeof(IServerPathTranslationService))
            {
                if (m_serverPathTranslationProvider == null)
                {
                    m_serverPathTranslationProvider = new TFSVCServerPathTranslationService();
                }
                return(m_serverPathTranslationProvider);
            }
            else if (serviceType == typeof(ISyncMonitorProvider))
            {
                if (m_syncMonitorProvider == null)
                {
                    m_syncMonitorProvider = new TfsVCSyncMonitorProvider();
                }
                return(m_syncMonitorProvider);
            }

            return(null);
        }
 /// <summary>
 /// Return a service based on serviceType.
 /// </summary>
 /// <param name="serviceType"></param>
 /// <returns></returns>
 public object GetService(Type serviceType)
 {
     if (serviceType == typeof(IAnalysisProvider))
     {
         if (m_analysisProvider == null)
         {
             m_analysisProvider = new ClearCaseSelectedHistoryAnalysisProvider(true);
         }
         return(m_analysisProvider);
     }
     else if (serviceType == typeof(IServerPathTranslationService))
     {
         if (m_serverPathTranslationProvider == null)
         {
             m_serverPathTranslationProvider = new CCTranslationService();
         }
         return(m_serverPathTranslationProvider);
     }
     else if (serviceType == typeof(IMigrationProvider))
     {
         if (m_migrationProvider == null)
         {
             m_migrationProvider = new ClearCaseMigrationProvider(new TfsFileSystemMigrationItemSerializer(), "HWMLastSyncedTfsChangeset");
         }
         return(m_migrationProvider);
     }
     else if (serviceType == typeof(IVCDiffProvider))
     {
         if (m_diffProvider == null)
         {
             m_diffProvider = new ClearCaseDiffProvider();
         }
         return(m_diffProvider);
     }
     else if (serviceType == typeof(ISyncMonitorProvider))
     {
         if (m_syncMonitorProvider == null)
         {
             m_syncMonitorProvider = (ISyncMonitorProvider)m_analysisProvider.GetService(typeof(ISyncMonitorProvider));
         }
         return(m_syncMonitorProvider);
     }
     return(null);
 }
Beispiel #6
0
 /// <summary>
 /// Return a service based on serviceType.
 /// </summary>
 /// <param name="serviceType"></param>
 /// <returns></returns>
 public object GetService(Type serviceType)
 {
     if (serviceType == typeof(IAnalysisProvider))
     {
         if (m_analysisProvider == null)
         {
             m_analysisProvider = new ClearCaseAnalysisProvider();
         }
         return(m_analysisProvider);
     }
     else if (serviceType == typeof(IServerPathTranslationService))
     {
         if (m_serverPathTranslationProvider == null)
         {
             m_serverPathTranslationProvider = new CCTranslationService();
         }
         return(m_serverPathTranslationProvider);
     }
     else if (serviceType == typeof(IMigrationProvider))
     {
         if (m_migrationProvider == null)
         {
             m_migrationProvider = new ClearCaseMigrationProvider();
         }
         return(m_migrationProvider);
     }
     else if (serviceType == typeof(IVCDiffProvider))
     {
         if (m_diffProvider == null)
         {
             m_diffProvider = new ClearCaseDiffProvider();
         }
         return(m_diffProvider);
     }
     else if (serviceType == typeof(ISyncMonitorProvider))
     {
         if (m_syncMonitorProvider == null)
         {
             m_syncMonitorProvider = new ClearCaseSyncMonitorProvider();
         }
         return(m_syncMonitorProvider);
     }
     return(null);
 }