Exemple #1
0
        public WaitingForChildrenTransition(IPersistenceStore persistenceStore,
                                            IContinuationDispatcher continuationDispatcher,
                                            IActivityToContinuationConverter activityToContinuationConverter,
                                            IRecoverableAction recoverableAction,
                                            IJobMutator jobMutator)
        {
            if (persistenceStore == null)
            {
                throw new ArgumentNullException("persistenceStore");
            }
            if (continuationDispatcher == null)
            {
                throw new ArgumentNullException("continuationDispatcher");
            }
            if (activityToContinuationConverter == null)
            {
                throw new ArgumentNullException("activityToContinuationConverter");
            }
            if (jobMutator == null)
            {
                throw new ArgumentNullException("JobMutator");
            }

            _persistenceStore                = persistenceStore;
            _continuationDispatcher          = continuationDispatcher;
            _activityToContinuationConverter = activityToContinuationConverter;
            _recoverableAction               = recoverableAction;
            _jobMutator = jobMutator;
        }
        public Scheduler(
            QueueConfiguration queueConfiguration,
            IDependableConfiguration configuration,
            IPersistenceStore persistenceStore,
            Func<DateTime> now,
            IFailedJobQueue failedJobQueue,
            IRecoverableAction recoverableAction,
            IJobRouter router,
            IActivityToContinuationConverter activityToContinuationConverter,
            IEnumerable<IJobPump> jobPumps,
            IJobMutator jobMutator)
        {
            if (queueConfiguration == null) throw new ArgumentNullException("queueConfiguration");
            if (configuration == null) throw new ArgumentNullException("configuration");
            if (persistenceStore == null) throw new ArgumentNullException("persistenceStore");
            if (now == null) throw new ArgumentNullException("now");
            if (failedJobQueue == null) throw new ArgumentNullException("failedJobQueue");
            if (recoverableAction == null) throw new ArgumentNullException("recoverableAction");
            if (router == null) throw new ArgumentNullException("router");
            if (activityToContinuationConverter == null)
                throw new ArgumentNullException("activityToContinuationConverter");
            if (jobPumps == null) throw new ArgumentNullException("jobPumps");
            if (jobMutator == null) throw new ArgumentNullException("jobMutator");

            _persistenceStore = persistenceStore;
            _now = now;
            _failedJobQueue = failedJobQueue;
            _recoverableAction = recoverableAction;

            _router = router;
            _activityToContinuationConverter = activityToContinuationConverter;
            _jobPumps = jobPumps;
            _jobMutator = jobMutator;
        }
        public ContinuationDispatcher(IJobRouter router,
                                      IJobMutator jobMutator,
                                      IPersistenceStore persistenceStore,
                                      IRecoverableAction recoverableAction)
        {
            if (router == null)
            {
                throw new ArgumentNullException("router");
            }
            if (jobMutator == null)
            {
                throw new ArgumentNullException("JobMutator");
            }
            if (persistenceStore == null)
            {
                throw new ArgumentNullException("persistenceStore");
            }
            if (recoverableAction == null)
            {
                throw new ArgumentNullException("recoverableAction");
            }

            _router            = router;
            _jobMutator        = jobMutator;
            _persistenceStore  = persistenceStore;
            _recoverableAction = recoverableAction;
        }
Exemple #4
0
		public ScopeContext(string contextPath, IClientRegistry clientRegistry, IScopeResolver scopeResolver, IServiceInvoker serviceInvoker, IPersistenceStore persistanceStore) {
			_contextPath = contextPath;
			_clientRegistry = clientRegistry;
			_scopeResolver = scopeResolver;
			_persistanceStore = persistanceStore;
			_serviceInvoker = serviceInvoker;
		}
Exemple #5
0
        public JobQueue(IEnumerable<Job> items, 
            int suspendedCount,
            ActivityConfiguration configuration,    
            IEnumerable<ActivityConfiguration> allActivityConfiguration,
            IPersistenceStore persistenceStore,
            IEventStream eventStream,
            IRecoverableAction recoverableAction,
            IJobMutator jobMutator)
        {
            if (items == null) throw new ArgumentNullException("items");
            if (configuration == null) throw new ArgumentNullException("configuration");
            if (allActivityConfiguration == null) throw new ArgumentNullException("allActivityConfiguration");
            if (persistenceStore == null) throw new ArgumentNullException("persistenceStore");
            if (eventStream == null) throw new ArgumentNullException("eventStream");
            if (recoverableAction == null) throw new ArgumentNullException("recoverableAction");
            if (jobMutator == null) throw new ArgumentNullException("JobMutator");

            Configuration = configuration;

            _suspendedCount = suspendedCount;
            _allActivityConfiguration = allActivityConfiguration;
            _persistenceStore = persistenceStore;
            _eventStream = eventStream;
            _recoverableAction = recoverableAction;
            _jobMutator = jobMutator;
            _items = new Queue<Job>(items);
        }
        public JobQueueFactory(
            IPersistenceStore persistenceStore,
            IDependableConfiguration configuration,
            IEventStream eventStream,
            IRecoverableAction recoverableAction,
            IJobMutator jobMutator)
        {
            if (persistenceStore == null)
            {
                throw new ArgumentNullException("persistenceStore");
            }
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration");
            }
            if (eventStream == null)
            {
                throw new ArgumentNullException("eventStream");
            }
            if (recoverableAction == null)
            {
                throw new ArgumentNullException("recoverableAction");
            }
            if (jobMutator == null)
            {
                throw new ArgumentNullException("JobMutator");
            }

            _persistenceStore  = persistenceStore;
            _configuration     = configuration;
            _eventStream       = eventStream;
            _recoverableAction = recoverableAction;
            _jobMutator        = jobMutator;
        }
        public ContinuationLiveness(IPersistenceStore persistenceStore, IContinuationDispatcher continuationDispatcher)
        {
            if (persistenceStore == null) throw new ArgumentNullException("persistenceStore");
            if (continuationDispatcher == null) throw new ArgumentNullException("continuationDispatcher");

            _persistenceStore = persistenceStore;
            _continuationDispatcher = continuationDispatcher;
        }
 public ScopeContext(string contextPath, IClientRegistry clientRegistry, IScopeResolver scopeResolver, IServiceInvoker serviceInvoker, IPersistenceStore persistanceStore)
 {
     _contextPath      = contextPath;
     _clientRegistry   = clientRegistry;
     _scopeResolver    = scopeResolver;
     _persistanceStore = persistanceStore;
     _serviceInvoker   = serviceInvoker;
 }
Exemple #9
0
 public ScopeContext(string contextPath, IClientRegistry clientRegistry, IScopeResolver scopeResolver, IServiceInvoker serviceInvoker, IPersistenceStore persistanceStore)
 {
     this._contextPath      = string.Empty;
     this._contextPath      = contextPath;
     this._clientRegistry   = clientRegistry;
     this._scopeResolver    = scopeResolver;
     this._persistanceStore = persistanceStore;
     this._serviceInvoker   = serviceInvoker;
 }
Exemple #10
0
        /// <summary>
        /// Instantiates Scheduler, including any configuration.
        /// </summary>
        /// <param name="action">A lambda that configures that sets the Scheduler configuration.</param>
        /// <exception cref="ArgumentOutOfRangeException"></exception>
        public static void Initialize(Action <IConfiguration> action = null)
        {
            if (null != _instance)
            {
                throw new InvalidOperationException("Scheduler cannot be initialized after the Scheduler Instance has been created.");
            }

            var configuration = new Configuration();

            if (null != action)
            {
                action(configuration);
            }

            Configuration = configuration;

            // Ensure container resolves persistence store based on configuration settings


            // Create Temp store,
            _persistenceStore = new InMemoryStore();
            // Determine store type from configuration
            switch (Configuration.PersistenceStoreType)
            {
            case PersistenceStoreType.Postgre:
                _persistenceStore = new PostgreStore(Configuration.ConnectionString);
                break;

            case PersistenceStoreType.SqlServer:
                _persistenceStore = new SqlServerStore(Configuration.ConnectionString);
                break;

            case PersistenceStoreType.InMemory:
                _persistenceStore = new InMemoryStore();
                break;
            }

            // Inject the persistence store after initialization
            SchedulerContainer.Container.Inject(_persistenceStore);

            // Initialise JobTypes modules
            var jobTypeStartups = SchedulerContainer.Container.GetAllInstances <IJobTypeStartup>();

            foreach (var jobTypeStartup in jobTypeStartups)
            {
                jobTypeStartup.Initialise(Configuration);
            }


            if (configuration.AutoStart)
            {
                IScheduler sched = Instance();
                sched.Start();
                SchedulerContainer.Container.Inject(sched);
            }
        }
Exemple #11
0
        public EndTransition(IPersistenceStore jobRepository,
            IJobMutator jobMutator,
            IContinuationDispatcher continuationDispatcher)
        {
            if (jobRepository == null) throw new ArgumentNullException("jobRepository");
            if (jobMutator == null) throw new ArgumentNullException("JobMutator");
            if (continuationDispatcher == null) throw new ArgumentNullException("continuationDispatcher");

            _jobRepository = jobRepository;
            _jobMutator = jobMutator;
            _continuationDispatcher = continuationDispatcher;
        }
Exemple #12
0
 public JobMutator(IEventStream eventStream, IPersistenceStore repository)
 {
     if (eventStream == null)
     {
         throw new ArgumentNullException("eventStream");
     }
     if (repository == null)
     {
         throw new ArgumentNullException("repository");
     }
     _eventStream = eventStream;
     _repository  = repository;
 }
Exemple #13
0
        public ContinuationLiveness(IPersistenceStore persistenceStore, IContinuationDispatcher continuationDispatcher)
        {
            if (persistenceStore == null)
            {
                throw new ArgumentNullException("persistenceStore");
            }
            if (continuationDispatcher == null)
            {
                throw new ArgumentNullException("continuationDispatcher");
            }

            _persistenceStore       = persistenceStore;
            _continuationDispatcher = continuationDispatcher;
        }
Exemple #14
0
        public JobQueue(IEnumerable <Job> items,
                        int suspendedCount,
                        ActivityConfiguration configuration,
                        IEnumerable <ActivityConfiguration> allActivityConfiguration,
                        IPersistenceStore persistenceStore,
                        IEventStream eventStream,
                        IRecoverableAction recoverableAction,
                        IJobMutator jobMutator)
        {
            if (items == null)
            {
                throw new ArgumentNullException("items");
            }
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration");
            }
            if (allActivityConfiguration == null)
            {
                throw new ArgumentNullException("allActivityConfiguration");
            }
            if (persistenceStore == null)
            {
                throw new ArgumentNullException("persistenceStore");
            }
            if (eventStream == null)
            {
                throw new ArgumentNullException("eventStream");
            }
            if (recoverableAction == null)
            {
                throw new ArgumentNullException("recoverableAction");
            }
            if (jobMutator == null)
            {
                throw new ArgumentNullException("JobMutator");
            }

            Configuration = configuration;

            _suspendedCount           = suspendedCount;
            _allActivityConfiguration = allActivityConfiguration;
            _persistenceStore         = persistenceStore;
            _eventStream       = eventStream;
            _recoverableAction = recoverableAction;
            _jobMutator        = jobMutator;
            _items             = new Queue <Job>(items);
        }
Exemple #15
0
		/// <summary>
		/// Creates shared object with given parent scope, name, persistence flag state and store object.
		/// </summary>
		/// <param name="parent"></param>
		/// <param name="name"></param>
		/// <param name="persistent"></param>
		/// <param name="store"></param>
		public SharedObjectScope(IScope parent, string name, bool persistent, IPersistenceStore store)
			: base(parent, SharedObjectService.ScopeType, name, persistent) {
			string path = parent.ContextPath;
			if (!path.StartsWith("/"))
				path = "/" + path;
			// Create shared object wrapper around the attributes
			_so = store.Load(name) as SharedObject;
			if (_so == null) {
				_so = new SharedObject(_attributes, name, path, persistent, store);
				store.Save(_so);
			} else {
				_so.Name = name;
				_so.Path = parent.ContextPath;
				_so.Store = store;
			}
		}
Exemple #16
0
        public void InstantiatePersistenceStoreWithApplicationPersistenceStore()
        {
            var dataStoreMock = new Mock <IDataStore>();
            var providerMock  = new Mock <IFrameworkProvider>();

            providerMock.Setup(pm => pm.HttpServerStore).Returns(dataStoreMock.Object);
            var locatorMock = new Mock <IServiceLocator>();

            locatorMock.Setup(l => l.GetInstance <IFrameworkProvider>()).Returns(providerMock.Object);

            var factory = new Factory(locatorMock.Object);

            IPersistenceStore store = factory.InstantiatePersistenceStore();

            Assert.NotNull(store);
            Assert.NotNull(store as ApplicationPersistenceStore);
        }
        public ContinuationDispatcher(IJobRouter router,
            IJobMutator jobMutator,
            IPersistenceStore persistenceStore,
            IRecoverableAction recoverableAction,
            IJobRootValidator jobRootValidator)
        {
            if (router == null) throw new ArgumentNullException("router");
            if (jobMutator == null) throw new ArgumentNullException("JobMutator");
            if (persistenceStore == null) throw new ArgumentNullException("persistenceStore");
            if (recoverableAction == null) throw new ArgumentNullException("recoverableAction");

            _router = router;
            _jobMutator = jobMutator;
            _persistenceStore = persistenceStore;
            _recoverableAction = recoverableAction;
            _jobRootValidator = jobRootValidator;
        }
        public WaitingForChildrenTransition(IPersistenceStore persistenceStore,
            IContinuationDispatcher continuationDispatcher,
            IActivityToContinuationConverter activityToContinuationConverter,
            IRecoverableAction recoverableAction,
            IJobMutator jobMutator)
        {
            if (persistenceStore == null) throw new ArgumentNullException("persistenceStore");
            if (continuationDispatcher == null) throw new ArgumentNullException("continuationDispatcher");
            if (activityToContinuationConverter == null)
                throw new ArgumentNullException("activityToContinuationConverter");
            if (jobMutator == null) throw new ArgumentNullException("JobMutator");

            _persistenceStore = persistenceStore;
            _continuationDispatcher = continuationDispatcher;
            _activityToContinuationConverter = activityToContinuationConverter;
            _recoverableAction = recoverableAction;
            _jobMutator = jobMutator;
        }
        public JobQueueFactory(
            IPersistenceStore persistenceStore, 
            IDependableConfiguration configuration,
            IEventStream eventStream,
            IRecoverableAction recoverableAction,
            IJobMutator jobMutator)
        {
            if (persistenceStore == null) throw new ArgumentNullException("persistenceStore");
            if (configuration == null) throw new ArgumentNullException("configuration");
            if (eventStream == null) throw new ArgumentNullException("eventStream");
            if (recoverableAction == null) throw new ArgumentNullException("recoverableAction");
            if (jobMutator == null) throw new ArgumentNullException("jobMutator");

            _persistenceStore = persistenceStore;
            _configuration = configuration;
            _eventStream = eventStream;
            _recoverableAction = recoverableAction;
            _jobMutator = jobMutator;
        }
Exemple #20
0
 public SharedObject()
 {
     this._name          = string.Empty;
     this._path          = string.Empty;
     this._lastModified  = -1L;
     this._persistent    = false;
     this._persistentSO  = false;
     this._hashes        = new Hashtable();
     this._storage       = null;
     this._version       = 1;
     this._updateCounter = 0;
     this._modified      = false;
     this._syncEvents    = new List <ISharedObjectEvent>();
     this._listeners     = new CopyOnWriteArray();
     this._source        = null;
     this._ownerMessage  = new SharedObjectMessage(null, null, -1, false);
     this._persistentSO  = false;
     this._creationTime  = Environment.TickCount;
 }
Exemple #21
0
        public EndTransition(IPersistenceStore jobRepository,
                             IJobMutator jobMutator,
                             IContinuationDispatcher continuationDispatcher)
        {
            if (jobRepository == null)
            {
                throw new ArgumentNullException("jobRepository");
            }
            if (jobMutator == null)
            {
                throw new ArgumentNullException("JobMutator");
            }
            if (continuationDispatcher == null)
            {
                throw new ArgumentNullException("continuationDispatcher");
            }

            _jobRepository          = jobRepository;
            _jobMutator             = jobMutator;
            _continuationDispatcher = continuationDispatcher;
        }
        public FailedJobQueue(
            IDependableConfiguration configuration,
            IPersistenceStore persistenceStore,
            Func<DateTime> now,
            IEventStream eventStream,
            IJobRouter router)
        {
            if (configuration == null) throw new ArgumentNullException("configuration");
            if (persistenceStore == null) throw new ArgumentNullException("persistenceStore");
            if (now == null) throw new ArgumentNullException("now");
            if(eventStream == null) throw new ArgumentNullException("eventStream");
            if(router == null) throw new ArgumentNullException("router");

            _configuration = configuration;
            _persistenceStore = persistenceStore;
            _now = now;
            _eventStream = eventStream;
            _router = router;

            _timer = new Timer(OnTick);
        }
        private IPersistenceStore GetStore(IScope scope, bool persistent)
        {
            IPersistenceStore store = null;

            if (!persistent)
            {
                // Use special store for non-persistent shared objects
                if (!scope.HasAttribute(SO_TRANSIENT_STORE))
                {
                    store = new MemoryStore(scope);
                    scope.SetAttribute(SO_TRANSIENT_STORE, store);
                    return(store);
                }
                return(scope.GetAttribute(SO_TRANSIENT_STORE) as IPersistenceStore);
            }
            // Evaluate configuration for persistent shared objects
            if (!scope.HasAttribute(SO_PERSISTENCE_STORE))
            {
                try
                {
                    Type type = ObjectFactory.Locate(_configuration.PersistenceStore.Type);
                    store = Activator.CreateInstance(type, new object[] { scope }) as IPersistenceStore;
                    if (_log.IsInfoEnabled)
                    {
                        _log.Info(__Res.GetString(__Res.SharedObjectService_CreateStore, store));
                    }
                }
                catch (Exception exception)
                {
                    if (_log.IsErrorEnabled)
                    {
                        _log.Error(__Res.GetString(__Res.SharedObjectService_CreateStoreError), exception);
                    }
                    store = new MemoryStore(scope);
                }
                scope.SetAttribute(SO_PERSISTENCE_STORE, store);
                return(store);
            }
            return(scope.GetAttribute(SO_PERSISTENCE_STORE) as IPersistenceStore);
        }
Exemple #24
0
 public SharedObject(IDictionary <string, object> data, string name, string path, bool persistent)
 {
     this._name          = string.Empty;
     this._path          = string.Empty;
     this._lastModified  = -1L;
     this._persistent    = false;
     this._persistentSO  = false;
     this._hashes        = new Hashtable();
     this._storage       = null;
     this._version       = 1;
     this._updateCounter = 0;
     this._modified      = false;
     this._syncEvents    = new List <ISharedObjectEvent>();
     this._listeners     = new CopyOnWriteArray();
     this._source        = null;
     base.SetAttributes(data);
     this._name         = name;
     this._path         = path;
     this._persistentSO = persistent;
     this._ownerMessage = new SharedObjectMessage(null, name, 0, persistent);
     this._creationTime = Environment.TickCount;
 }
        /// <summary>
        /// Creates shared object with given parent scope, name, persistence flag state and store object.
        /// </summary>
        /// <param name="parent"></param>
        /// <param name="name"></param>
        /// <param name="persistent"></param>
        /// <param name="store"></param>
        public SharedObjectScope(IScope parent, string name, bool persistent, IPersistenceStore store) : base(parent, SharedObjectService.ScopeType, name, persistent)
        {
            string path = parent.ContextPath;

            if (!path.StartsWith("/"))
            {
                path = "/" + path;
            }
            // Create shared object wrapper around the attributes
            _so = store.Load(name) as SharedObject;
            if (_so == null)
            {
                _so = new SharedObject(_attributes, name, path, persistent, store);
                store.Save(_so);
            }
            else
            {
                _so.Name  = name;
                _so.Path  = parent.ContextPath;
                _so.Store = store;
            }
        }
Exemple #26
0
        private IPersistenceStore GetStore(IScope scope, bool persistent)
        {
            IPersistenceStore store = null;

            if (!persistent)
            {
                if (!scope.HasAttribute(SO_TRANSIENT_STORE))
                {
                    store = new MemoryStore(scope);
                    scope.SetAttribute(SO_TRANSIENT_STORE, store);
                    return(store);
                }
                return(scope.GetAttribute(SO_TRANSIENT_STORE) as IPersistenceStore);
            }
            if (!scope.HasAttribute(SO_PERSISTENCE_STORE))
            {
                try
                {
                    store = Activator.CreateInstance(ObjectFactory.Locate(this._configuration.PersistenceStore.Type), new object[] { scope }) as IPersistenceStore;
                    if (this._log.get_IsInfoEnabled())
                    {
                        this._log.Info(__Res.GetString("SharedObjectService_CreateStore", new object[] { store }));
                    }
                }
                catch (Exception exception)
                {
                    if (this._log.get_IsErrorEnabled())
                    {
                        this._log.Error(__Res.GetString("SharedObjectService_CreateStoreError"), exception);
                    }
                    store = new MemoryStore(scope);
                }
                scope.SetAttribute(SO_PERSISTENCE_STORE, store);
                return(store);
            }
            return(scope.GetAttribute(SO_PERSISTENCE_STORE) as IPersistenceStore);
        }
        public SharedObjectScope(IScope parent, string name, bool persistent, IPersistenceStore store) : base(parent, SharedObjectService.ScopeType, name, persistent)
        {
            this._serverListeners  = new CopyOnWriteArray();
            this._handlers         = new Hashtable();
            this._securityHandlers = new CopyOnWriteArray();
            string contextPath = parent.ContextPath;

            if (!contextPath.StartsWith("/"))
            {
                contextPath = "/" + contextPath;
            }
            this._so = store.Load(name) as SharedObject;
            if (this._so == null)
            {
                this._so = new SharedObject(base._attributes, name, contextPath, persistent, store);
                store.Save(this._so);
            }
            else
            {
                this._so.Name  = name;
                this._so.Path  = parent.ContextPath;
                this._so.Store = store;
            }
        }
Exemple #28
0
        public FailedJobQueue(
            IDependableConfiguration configuration,
            IPersistenceStore persistenceStore,
            Func <DateTime> now,
            IEventStream eventStream,
            IJobRouter router)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration");
            }
            if (persistenceStore == null)
            {
                throw new ArgumentNullException("persistenceStore");
            }
            if (now == null)
            {
                throw new ArgumentNullException("now");
            }
            if (eventStream == null)
            {
                throw new ArgumentNullException("eventStream");
            }
            if (router == null)
            {
                throw new ArgumentNullException("router");
            }

            _configuration    = configuration;
            _persistenceStore = persistenceStore;
            _now         = now;
            _eventStream = eventStream;
            _router      = router;

            _timer = new Timer(OnTick);
        }
Exemple #29
0
        private IPersistenceStore Activate(object target)
        {
            IPersistenceStore retval = null;

            if (target.GetType().GetInterfaces().Contains(typeof(IPersistenceStore)))
            {
                switch (_config.PersistenceStoreType)
                {
                case PersistenceStoreType.Postgre:
                    retval = new PostgreStore(_config.ConnectionString);
                    break;

                case PersistenceStoreType.SqlServer:
                    retval = new SqlServerStore(_config.ConnectionString);
                    break;

                case PersistenceStoreType.InMemory:
                    retval = new InMemoryStore();
                    break;
                }
            }

            return(retval);
        }
Exemple #30
0
 public SchedulerCore(IScheduler scheduler, IPersistenceStore persistenceStore)
 {
     _scheduler        = scheduler;
     _persistenceStore = persistenceStore;
 }
 public ActorsController(IPersistenceStore persistence, ICustomerMembership membership)
 {
     _persistence = persistence;
     _membership  = membership;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="GlimpseConfiguration" /> class.
        /// </summary>
        /// <param name="frameworkProvider">The framework provider.</param>
        /// <param name="endpointConfiguration">The resource endpoint configuration.</param>
        /// <param name="clientScripts">The client scripts collection.</param>
        /// <param name="logger">The logger.</param>
        /// <param name="defaultRuntimePolicy">The default runtime policy.</param>
        /// <param name="htmlEncoder">The Html encoder.</param>
        /// <param name="persistenceStore">The persistence store.</param>
        /// <param name="inspectors">The inspectors collection.</param>
        /// <param name="resources">The resources collection.</param>
        /// <param name="serializer">The serializer.</param>
        /// <param name="tabs">The tabs collection.</param>
        /// <param name="runtimePolicies">The runtime policies collection.</param>
        /// <param name="defaultResource">The default resource.</param>
        /// <param name="proxyFactory">The proxy factory.</param>
        /// <param name="messageBroker">The message broker.</param>
        /// <param name="endpointBaseUri">The endpoint base Uri.</param>
        /// <param name="timerStrategy">The timer strategy.</param>
        /// <param name="runtimePolicyStrategy">The runtime policy strategy.</param>
        /// <exception cref="System.ArgumentNullException">An exception is thrown if any parameter is <c>null</c>.</exception>
        public GlimpseConfiguration(
            IFrameworkProvider frameworkProvider, 
            ResourceEndpointConfiguration endpointConfiguration,
            ICollection<IClientScript> clientScripts,
            ILogger logger,
            RuntimePolicy defaultRuntimePolicy,
            IHtmlEncoder htmlEncoder,
            IPersistenceStore persistenceStore,
            ICollection<IInspector> inspectors,
            ICollection<IResource> resources,
            ISerializer serializer,
            ICollection<ITab> tabs,
            ICollection<IDisplay> displays,
            ICollection<IRuntimePolicy> runtimePolicies,
            IResource defaultResource,
            IProxyFactory proxyFactory,
            IMessageBroker messageBroker,
            string endpointBaseUri,
            Func<IExecutionTimer> timerStrategy,
            Func<RuntimePolicy> runtimePolicyStrategy)
        {
            if (frameworkProvider == null)
            {
                throw new ArgumentNullException("frameworkProvider");
            }

            if (endpointConfiguration == null)
            {
                throw new ArgumentNullException("endpointConfiguration");
            }

            if (logger == null)
            {
                throw new ArgumentNullException("logger");
            }

            if (htmlEncoder == null)
            {
                throw new ArgumentNullException("htmlEncoder");
            }

            if (persistenceStore == null)
            {
                throw new ArgumentNullException("persistenceStore");
            }

            if (clientScripts == null)
            {
                throw new ArgumentNullException("clientScripts");
            }

            if (resources == null)
            {
                throw new ArgumentNullException("inspectors");
            }

            if (serializer == null)
            {
                throw new ArgumentNullException("serializer");
            }

            if (tabs == null)
            {
                throw new ArgumentNullException("tabs");
            }

            if (displays == null)
            {
                throw new ArgumentNullException("displays");
            }

            if (runtimePolicies == null)
            {
                throw new ArgumentNullException("runtimePolicies");
            }

            if (defaultResource == null)
            {
                throw new ArgumentNullException("defaultResource");
            }

            if (proxyFactory == null)
            {
                throw new ArgumentNullException("proxyFactory");
            }

            if (messageBroker == null)
            {
                throw new ArgumentNullException("messageBroker");
            }

            if (endpointBaseUri == null)
            {
                throw new ArgumentNullException("endpointBaseUri");
            }

            if (timerStrategy == null)
            {
                throw new ArgumentNullException("timerStrategy");
            }

            if (runtimePolicyStrategy == null)
            {
                throw new ArgumentNullException("runtimePolicyStrategy");
            }

            Logger = logger;
            ClientScripts = clientScripts;
            FrameworkProvider = frameworkProvider;
            HtmlEncoder = htmlEncoder;
            PersistenceStore = persistenceStore;
            Inspectors = inspectors;
            ResourceEndpoint = endpointConfiguration;
            Resources = resources;
            Serializer = serializer;
            Tabs = tabs;
            Displays = displays;
            RuntimePolicies = runtimePolicies;
            DefaultRuntimePolicy = defaultRuntimePolicy;
            DefaultResource = defaultResource;
            ProxyFactory = proxyFactory;
            MessageBroker = messageBroker;
            EndpointBaseUri = endpointBaseUri;
            TimerStrategy = timerStrategy;
            RuntimePolicyStrategy = runtimePolicyStrategy;
        }
 public AuditTriggerListener(IPersistenceStore persistancestore)
 {
     _persistenceStore = persistancestore;
 }
Exemple #34
0
 public PersistedUserMembership(IHttpContextAccessor context, MembershipOptions options, IPersistenceStore persistence)
 {
     _context     = context;
     _persistence = persistence;
     Options      = options;
 }
Exemple #35
0
 public ConfigurationController(IPersistenceStore persistence, IUserMembership membership)
 {
     _persistence = persistence;
     _membership  = membership;
 }
		/// <summary>
		/// Initializes a new instance of the SharedObject class.
		/// </summary>
		/// <param name="data"></param>
		/// <param name="name"></param>
		/// <param name="path"></param>
		/// <param name="persistent"></param>
		/// <param name="storage"></param>
        public SharedObject(IDictionary data, string name, string path, bool persistent, IPersistenceStore storage)
            : this(data, name, path, persistent)
        {
            this.Store = storage;
        }
Exemple #37
0
 public AlexaRequestInformation(SkillRequest request, object context, IPersistenceStore persistenceStore) : base(request, context, persistenceStore)
 {
 }
 public JobRootValidator(IPersistenceStore persistenceStore)
 {
     if (persistenceStore == null) throw new ArgumentNullException("persistenceStore");
     _persistenceStore = persistenceStore;
 }
Exemple #39
0
 public ViewsController(IPersistenceStore persistence, ICustomerViewMembership membership)
 {
     _persistence = persistence;
     _membership  = membership;
 }
 public HealthController(IPersistenceStore persistence)
 {
     _persistence = persistence;
 }
Exemple #41
0
 /// <summary>
 /// Initializes a new instance of the SharedObject class.
 /// </summary>
 /// <param name="data"></param>
 /// <param name="name"></param>
 /// <param name="path"></param>
 /// <param name="persistent"></param>
 /// <param name="storage"></param>
 public SharedObject(IDictionary data, string name, string path, bool persistent, IPersistenceStore storage)
     : this(data, name, path, persistent)
 {
     this.Store = storage;
 }
Exemple #42
0
        /// <summary>
        /// Initializes a new instance of the <see cref="GlimpseConfiguration" /> class.
        /// </summary>
        /// <param name="frameworkProvider">The framework provider.</param>
        /// <param name="endpointConfiguration">The resource endpoint configuration.</param>
        /// <param name="clientScripts">The client scripts collection.</param>
        /// <param name="logger">The logger.</param>
        /// <param name="defaultRuntimePolicy">The default runtime policy.</param>
        /// <param name="htmlEncoder">The Html encoder.</param>
        /// <param name="persistenceStore">The persistence store.</param>
        /// <param name="inspectors">The inspectors collection.</param>
        /// <param name="resources">The resources collection.</param>
        /// <param name="serializer">The serializer.</param>
        /// <param name="tabs">The tabs collection.</param>
        /// <param name="runtimePolicies">The runtime policies collection.</param>
        /// <param name="defaultResource">The default resource.</param>
        /// <param name="proxyFactory">The proxy factory.</param>
        /// <param name="messageBroker">The message broker.</param>
        /// <param name="endpointBaseUri">The endpoint base Uri.</param>
        /// <param name="timerStrategy">The timer strategy.</param>
        /// <param name="runtimePolicyStrategy">The runtime policy strategy.</param>
        /// <exception cref="System.ArgumentNullException">An exception is thrown if any parameter is <c>null</c>.</exception>
        public GlimpseConfiguration(
            IFrameworkProvider frameworkProvider,
            ResourceEndpointConfiguration endpointConfiguration,
            ICollection <IClientScript> clientScripts,
            ILogger logger,
            RuntimePolicy defaultRuntimePolicy,
            IHtmlEncoder htmlEncoder,
            IPersistenceStore persistenceStore,
            ICollection <IInspector> inspectors,
            ICollection <IResource> resources,
            ISerializer serializer,
            ICollection <ITab> tabs,
            ICollection <IRuntimePolicy> runtimePolicies,
            IResource defaultResource,
            IProxyFactory proxyFactory,
            IMessageBroker messageBroker,
            string endpointBaseUri,
            Func <IExecutionTimer> timerStrategy,
            Func <RuntimePolicy> runtimePolicyStrategy)
        {
            if (frameworkProvider == null)
            {
                throw new ArgumentNullException("frameworkProvider");
            }

            if (endpointConfiguration == null)
            {
                throw new ArgumentNullException("endpointConfiguration");
            }

            if (logger == null)
            {
                throw new ArgumentNullException("logger");
            }

            if (htmlEncoder == null)
            {
                throw new ArgumentNullException("htmlEncoder");
            }

            if (persistenceStore == null)
            {
                throw new ArgumentNullException("persistenceStore");
            }

            if (clientScripts == null)
            {
                throw new ArgumentNullException("clientScripts");
            }

            if (resources == null)
            {
                throw new ArgumentNullException("inspectors");
            }

            if (serializer == null)
            {
                throw new ArgumentNullException("serializer");
            }

            if (tabs == null)
            {
                throw new ArgumentNullException("tabs");
            }

            if (runtimePolicies == null)
            {
                throw new ArgumentNullException("runtimePolicies");
            }

            if (defaultResource == null)
            {
                throw new ArgumentNullException("defaultResource");
            }

            if (proxyFactory == null)
            {
                throw new ArgumentNullException("proxyFactory");
            }

            if (messageBroker == null)
            {
                throw new ArgumentNullException("messageBroker");
            }

            if (endpointBaseUri == null)
            {
                throw new ArgumentNullException("endpointBaseUri");
            }

            if (timerStrategy == null)
            {
                throw new ArgumentNullException("timerStrategy");
            }

            if (runtimePolicyStrategy == null)
            {
                throw new ArgumentNullException("runtimePolicyStrategy");
            }

            Logger            = logger;
            ClientScripts     = clientScripts;
            FrameworkProvider = frameworkProvider;
            HtmlEncoder       = htmlEncoder;
            PersistenceStore  = persistenceStore;
            Inspectors        = inspectors;
            ResourceEndpoint  = endpointConfiguration;
            Resources         = resources;
            Serializer        = serializer;
            Tabs                  = tabs;
            RuntimePolicies       = runtimePolicies;
            DefaultRuntimePolicy  = defaultRuntimePolicy;
            DefaultResource       = defaultResource;
            ProxyFactory          = proxyFactory;
            MessageBroker         = messageBroker;
            EndpointBaseUri       = endpointBaseUri;
            TimerStrategy         = timerStrategy;
            RuntimePolicyStrategy = runtimePolicyStrategy;
        }
 public EntriesController(IPersistenceStore persistence, IUserMembership membership)
 {
     _persistence = persistence;
     _membership  = membership;
 }