Beispiel #1
0
 internal MergeRequestLoader(DataCacheOperator op, InternalCacheUpdater cacheUpdater, bool updateOnlyOpened,
                             bool isApprovalStatusSupported)
     : base(op)
 {
     _cacheUpdater     = cacheUpdater;
     _versionLoader    = new VersionLoader(op, cacheUpdater);
     _approvalLoader   = isApprovalStatusSupported ? new ApprovalLoader(op, cacheUpdater) : null;
     _updateOnlyOpened = updateOnlyOpened;
 }
Beispiel #2
0
 internal MergeRequestListLoader(string hostname, DataCacheOperator op,
                                 InternalCacheUpdater cacheUpdater, DataCacheCallbacks callbacks,
                                 SearchQueryCollection queryCollection, bool isApprovalStatusSupported)
     : base(op)
 {
     _hostname        = hostname;
     _cacheUpdater    = cacheUpdater;
     _versionLoader   = new VersionLoader(_operator, cacheUpdater);
     _approvalLoader  = isApprovalStatusSupported ? new ApprovalLoader(_operator, cacheUpdater) : null;
     _callbacks       = callbacks;
     _queryCollection = queryCollection;
 }
Beispiel #3
0
        internal static IMergeRequestListLoader CreateMergeRequestListLoader(string hostname,
                                                                             DataCacheOperator op, DataCacheConnectionContext context, InternalCacheUpdater cache)
        {
            IVersionLoader versionLoader = new VersionLoader(op, cache);

            IMergeRequestListLoader listLoader = null;

            if (context.CustomData is ProjectBasedContext)
            {
                listLoader = new ProjectBasedMergeRequestLoader(
                    op, versionLoader, cache, context);
            }
            else if (context.CustomData is SearchBasedContext)
            {
                listLoader = new SearchBasedMergeRequestLoader(hostname,
                                                               op, versionLoader, cache, context);
            }
            return(listLoader);
        }
Beispiel #4
0
 internal MergeRequestLoader(DataCacheOperator op, InternalCacheUpdater cacheUpdater)
     : base(op)
 {
     _cacheUpdater  = cacheUpdater;
     _versionLoader = new VersionLoader(op, cacheUpdater);
 }