Esempio n. 1
0
        public ContentGrain(
            IStore <Guid> store,
            ISemanticLog log,
            IAppProvider appProvider,
            IAssetRepository assetRepository,
            IScriptEngine scriptEngine,
            IContentWorkflow contentWorkflow,
            IContentRepository contentRepository,
            IActivationLimit limit)
            : base(store, log)
        {
            Guard.NotNull(appProvider, nameof(appProvider));
            Guard.NotNull(scriptEngine, nameof(scriptEngine));
            Guard.NotNull(assetRepository, nameof(assetRepository));
            Guard.NotNull(contentWorkflow, nameof(contentWorkflow));
            Guard.NotNull(contentRepository, nameof(contentRepository));

            this.appProvider       = appProvider;
            this.scriptEngine      = scriptEngine;
            this.assetRepository   = assetRepository;
            this.contentWorkflow   = contentWorkflow;
            this.contentRepository = contentRepository;

            limit?.SetLimit(5000, Lifetime);
        }
Esempio n. 2
0
        public AssetGrain(IStore <Guid> store, ITagService tagService, IActivationLimit limit, ISemanticLog log)
            : base(store, log)
        {
            Guard.NotNull(tagService);

            this.tagService = tagService;

            limit?.SetLimit(5000, Lifetime);
        }
Esempio n. 3
0
        public AssetFolderGrain(IStore <Guid> store, IAssetQueryService assetQuery, IActivationLimit limit, ISemanticLog log)
            : base(store, log)
        {
            Guard.NotNull(assetQuery);

            this.assetQuery = assetQuery;

            limit?.SetLimit(5000, Lifetime);
        }
Esempio n. 4
0
            private static IGrainRuntime CreateRuntime(IActivationLimit limit)
            {
                var serviceProvider = A.Fake <IServiceProvider>();

                var grainRuntime = A.Fake <IGrainRuntime>();

                A.CallTo(() => grainRuntime.ServiceProvider)
                .Returns(serviceProvider);

                A.CallTo(() => serviceProvider.GetService(typeof(IActivationLimit)))
                .Returns(limit);

                return(grainRuntime);
            }
Esempio n. 5
0
 public AssetDomainObjectGrain(IServiceProvider serviceProvider, IActivationLimit limit)
     : base(serviceProvider)
 {
     limit?.SetLimit(5000, Lifetime);
 }
 public MyGrain(IGrainIdentity identity, IGrainRuntime runtime, IActivationLimit limit)
     : base(identity, runtime)
 {
     limit.SetLimit(3, TimeSpan.FromMinutes(3));
 }
Esempio n. 7
0
 public MyGrain(IActivationLimit limit)
     : base(null, CreateRuntime(limit))
 {
 }