Exemplo n.º 1
0
        public MongoTodoQueueStore(TodoQueueService director, IConfigSectionNode node) : base(director, node)
        {
            var cstring = ConfigStringBuilder.Build(node, CONFIG_MONGO_SECTION);

            m_Database  = MongoClient.DatabaseFromConnectString(cstring);
            m_Converter = FactoryUtils.MakeAndConfigure <RowConverter>(node[CONFIG_CONVERTER_SECTION], typeof(RowConverter));
        }
Exemplo n.º 2
0
 protected override void Destructor()
 {
     base.Destructor();
     DisposeAndNull(ref m_QueueStore);
     lock (s_Lock)
         s_Instance = null;
 }
Exemplo n.º 3
0
        internal TodoQueue(TodoQueueService director, IConfigSectionNode node) : base(director)
        {
            ConfigAttribute.Apply(this, node);

            if (Name.IsNullOrWhiteSpace())
            {
                throw new WorkersException(GetType().Name + ".ctor($name=null|empty)");
            }
        }
Exemplo n.º 4
0
        public TodoQueueService(object director) : base(director)
        {
            m_Queues = new Registry <TodoQueue>();

            lock (s_Lock)
            {
                if (s_Instance != null)
                {
                    throw new WorkersException("{0} is already allocated".Args(typeof(TodoQueueService).FullName));
                }

                s_Instance = this;
            }
        }
Exemplo n.º 5
0
 protected TodoQueueStore(TodoQueueService director, IConfigSectionNode node) : base(director)
 {
     ConfigAttribute.Apply(this, node);
 }