Beispiel #1
0
 /// <summary>
 /// Gets the providers supported by this Adapter.
 /// </summary>
 /// <param name="serviceType">IAnalysisProvider, IMigrationProvider, or ILinkProvider</param>
 /// <returns></returns>
 public object GetService(Type serviceType)
 {
     if (serviceType == typeof(IAnalysisProvider))
     {
         if (m_analysisProvider == null)
         {
             m_analysisProvider = new ClearQuestAnalysisProvider();
         }
         return(m_analysisProvider);
     }
     else if (serviceType == typeof(IMigrationProvider))
     {
         if (m_migrationProvider == null)
         {
             m_migrationProvider = new ClearQuestMigrationProvider();
         }
         return(m_migrationProvider);
     }
     else if (serviceType == typeof(ILinkProvider))
     {
         if (m_linkProvider == null)
         {
             m_linkProvider = new ClearQuestLinkProvider();
         }
         return(m_linkProvider);
     }
     else if (serviceType == typeof(IWITDiffProvider))
     {
         if (m_witDiffProvider == null)
         {
             m_witDiffProvider = new ClearQuestDiffProvider();
         }
         return(m_witDiffProvider);
     }
     else if (serviceType == typeof(ISyncMonitorProvider))
     {
         if (m_syncMonitorProvider == null)
         {
             m_syncMonitorProvider = new ClearQuestSyncMonitorProvider();
         }
         return(m_syncMonitorProvider);
     }
     else if (serviceType == typeof(IAddin))
     {
         if (m_userIdLookupAddin == null)
         {
             m_userIdLookupAddin = new ClearQuestUserIdLookupAddin();
         }
         return(m_userIdLookupAddin);
     }
     else
     {
         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 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 #3
0
        public virtual object GetService(Type serviceType)
        {
            if (serviceType == typeof(IAnalysisProvider))
            {
                if (m_analysisProvider == null)
                {
                    m_analysisProvider = new Tfs2010WitAnalysisProvider();
                }
                return(m_analysisProvider);
            }

            if (serviceType == typeof(IMigrationProvider))
            {
                if (m_migrationProvider == null)
                {
                    m_migrationProvider = new Tfs2010WitMigrationProvider();
                }
                return(m_migrationProvider);
            }

            if (serviceType == typeof(ILinkProvider))
            {
                if (m_linkProvider == null)
                {
                    m_linkProvider = new Tfs2010LinkProvider();
                }
                return(m_linkProvider);
            }

            if (serviceType == typeof(IWITDiffProvider))
            {
                if (m_witDiffProvider == null)
                {
                    m_witDiffProvider = new TfsWITDiffProvider();
                }
                return(m_witDiffProvider);
            }

            if (serviceType == typeof(ISyncMonitorProvider))
            {
                if (m_syncMonitorProvider == null)
                {
                    m_syncMonitorProvider = new TfsWITSyncMonitorProvider();
                }
                return(m_syncMonitorProvider);
            }

            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);
 }