Example #1
0
        public GetDeserializedGameDetailsAsyncDelegate(
            IGetResourceAsyncDelegate getResourceAsyncDelegate,
            ISerializationController <string> serializationController,
            ILanguageController languageController,
            IFormatDelegate <string, string> formatDownloadLanguageDelegate,
            IConfirmDelegate <string> confirmStringContainsLanguageDownloadsDelegate,
            IItemizeDelegate <string, string> itemizeDownloadLanguagesDelegate,
            IItemizeDelegate <string, string> itemizeGameDetailsDownloadsDelegate,
            IReplaceMultipleDelegate <string> replaceMultipleStringsDelegate,
            IConvertDelegate <
                OperatingSystemsDownloads[][],
                OperatingSystemsDownloads[]> convert2DArrayToArrayDelegate,
            ICollectionController collectionController)
        {
            this.getResourceAsyncDelegate       = getResourceAsyncDelegate;
            this.serializationController        = serializationController;
            this.languageController             = languageController;
            this.formatDownloadLanguageDelegate = formatDownloadLanguageDelegate;

            this.confirmStringContainsLanguageDownloadsDelegate = confirmStringContainsLanguageDownloadsDelegate;
            this.itemizeDownloadLanguagesDelegate    = itemizeDownloadLanguagesDelegate;
            this.itemizeGameDetailsDownloadsDelegate = itemizeGameDetailsDownloadsDelegate;
            this.replaceMultipleStringsDelegate      = replaceMultipleStringsDelegate;
            this.convert2DArrayToArrayDelegate       = convert2DArrayToArrayDelegate;
            this.collectionController = collectionController;
        }
Example #2
0
 public ConfirmStringMatchesAllDelegate(
     ICollectionController collectionController,
     params string[] matches)
 {
     this.collectionController = collectionController;
     this.matches = matches;
 }
Example #3
0
 public TemplateController(
     string primaryTemplateTitle,
     IStashController <List <T> > templateStashController,
     ICollectionController collectionController)
 {
     this.PrimaryTemplate         = primaryTemplateTitle;
     this.templateStashController = templateStashController;
     this.collectionController    = collectionController;
 }
        public ConstrainRequestRateAsyncDelegate(
            IConstrainAsyncDelegate <int> constrainExecutionAsyncDelegate,
            ICollectionController collectionController,
            IStatusController statusController,
            params string[] uriPrefixes)
        {
            this.constrainExecutionAsyncDelegate = constrainExecutionAsyncDelegate;
            this.collectionController            = collectionController;
            this.statusController  = statusController;
            lastRequestToUriPrefix = new Dictionary <string, DateTime>();
            rateLimitRequestsCount = 0;

            this.uriPrefixes = uriPrefixes;

            if (this.uriPrefixes != null)
            {
                foreach (var prefix in this.uriPrefixes)
                {
                    lastRequestToUriPrefix.Add(
                        prefix,
                        DateTime.UtcNow - TimeSpan.FromSeconds(requestIntervalSeconds));
                }
            }
        }