Ejemplo n.º 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 context = new ServerExecutionContext())
     {
         var broker   = context.ReadContext.GetBroker <IServiceLockEntityBroker>();
         var criteria = new ServiceLockSelectCriteria();
         criteria.ServiceLockTypeEnum.EqualTo(type);
         return(broker.Find(criteria));
     }
 }
Ejemplo n.º 2
0
 public ServiceLock(
     ServiceLockTypeEnum _serviceLockTypeEnum_
     , Boolean _lock_
     , DateTime _scheduledTime_
     , Boolean _enabled_
     , XmlDocument _state_
     , ServerEntityKey _serverPartitionKey_
     , ServerEntityKey _filesystemKey_
     , String _processorId_
     ) : base("ServiceLock")
 {
     ServiceLockTypeEnum = _serviceLockTypeEnum_;
     Lock               = _lock_;
     ScheduledTime      = _scheduledTime_;
     Enabled            = _enabled_;
     State              = _state_;
     ServerPartitionKey = _serverPartitionKey_;
     FilesystemKey      = _filesystemKey_;
     ProcessorId        = _processorId_;
 }