Exemple #1
0
 /// <summary>
 /// Finds all <see cref="ServiceLock"/> of the specified <see cref="ServiceLockTypeEnum"/>
 /// </summary>
 /// <param name="type"></param>
 /// <returns></returns>
 public static IList<ServiceLock> FindServicesOfType(ServiceLockTypeEnum type)
 {
     using (var readCtx = PersistentStoreRegistry.GetDefaultStore().OpenReadContext())
     {
         var broker = readCtx.GetBroker<IServiceLockEntityBroker>();
         var criteria = new ServiceLockSelectCriteria();
         criteria.ServiceLockTypeEnum.EqualTo(type);
         return broker.Find(criteria);
     }
 }
Exemple #2
0
 /// <summary>
 /// Finds all <see cref="ServiceLock"/> of the specified <see cref="ServiceLockTypeEnum"/>
 /// </summary>
 /// <param name="type"></param>
 /// <returns></returns>
 public static IList<ServiceLock> FindServicesOfType(ServiceLockTypeEnum type)
 {
     using (var context = new ServerExecutionContext())
     {
         var broker = context.ReadContext.GetBroker<IServiceLockEntityBroker>();
         var criteria = new ServiceLockSelectCriteria();
         criteria.ServiceLockTypeEnum.EqualTo(type);
         return broker.Find(criteria);
     }
 }
 /// <summary>
 /// Finds all <see cref="ServiceLock"/> of the specified <see cref="ServiceLockTypeEnum"/>
 /// </summary>
 /// <param name="type"></param>
 /// <returns></returns>
 public static IList <ServiceLock> FindServicesOfType(ServiceLockTypeEnum type)
 {
     using (var context = new ServerExecutionContext())
     {
         var broker   = context.ReadContext.GetBroker <IServiceLockEntityBroker>();
         var criteria = new ServiceLockSelectCriteria();
         criteria.ServiceLockTypeEnum.EqualTo(type);
         return(broker.Find(criteria));
     }
 }
Exemple #4
0
 /// <summary>
 /// Finds all <see cref="ServiceLock"/> of the specified <see cref="ServiceLockTypeEnum"/>
 /// </summary>
 /// <param name="type"></param>
 /// <returns></returns>
 public static IList <ServiceLock> FindServicesOfType(ServiceLockTypeEnum type)
 {
     using (var readCtx = PersistentStoreRegistry.GetDefaultStore().OpenReadContext())
     {
         var broker   = readCtx.GetBroker <IServiceLockEntityBroker>();
         var criteria = new ServiceLockSelectCriteria();
         criteria.ServiceLockTypeEnum.EqualTo(type);
         return(broker.Find(criteria));
     }
 }
Exemple #5
0
 public ServiceLock(
     ServiceLockTypeEnum _serviceLockTypeEnum_
     , Boolean _lock_
     , DateTime _scheduledTime_
     , Boolean _enabled_
     , XmlDocument _state_
     , ServerEntityKey _filesystemKey_
     , String _processorId_
     ) : base("ServiceLock")
 {
     ServiceLockTypeEnum = _serviceLockTypeEnum_;
     Lock          = _lock_;
     ScheduledTime = _scheduledTime_;
     Enabled       = _enabled_;
     State         = _state_;
     FilesystemKey = _filesystemKey_;
     ProcessorId   = _processorId_;
 }
Exemple #6
0
 public ServiceLock(
      ServiceLockTypeEnum _serviceLockTypeEnum_
     ,Boolean _lock_
     ,DateTime _scheduledTime_
     ,Boolean _enabled_
     ,XmlDocument _state_
     ,ServerEntityKey _filesystemKey_
     ,String _processorId_
     ):base("ServiceLock")
 {
     ServiceLockTypeEnum = _serviceLockTypeEnum_;
     Lock = _lock_;
     ScheduledTime = _scheduledTime_;
     Enabled = _enabled_;
     State = _state_;
     FilesystemKey = _filesystemKey_;
     ProcessorId = _processorId_;
 }