public SendLocationIsolationCrewService(OutageModel outageModel)
 {
     this.outageModel    = outageModel;
     dbContext           = outageModel.dbContext;
     proxyFactory        = new ProxyFactory();
     outageMessageMapper = new OutageMessageMapper();
 }
Exemplo n.º 2
0
        public PotentialOutageReportingProvider(IReliableStateManager stateManager, OutageLifecycleHelper outageLifecycleHelper)
        {
            this.baseLogString = $"{this.GetType()} [{this.GetHashCode()}] =>{Environment.NewLine}";

            this.outageMessageMapper = new OutageMessageMapper();
            this.lifecycleHelper     = outageLifecycleHelper;

            this.ignorableCommandOriginTypes = new HashSet <CommandOriginType>()
            {
                CommandOriginType.USER_COMMAND,
                CommandOriginType.ISOLATING_ALGORITHM_COMMAND,
                CommandOriginType.LOCATION_AND_ISOLATING_ALGORITHM_COMMAND,
                CommandOriginType.UNKNOWN_ORIGIN,
            };

            this.isStartedIsolationAlgorithmsInitialized = false;
            this.isRecloserOutageMapInitialized          = false;
            this.isOutageTopologyModelInitialized        = false;
            this.isPotentialOutagesQueueInitialized      = false;
            this.isCommandedElementsInitialized          = false;
            this.isOptimumIsolationPointsInitialized     = false;
            this.isElementsToBeIgnoredInReportPotentialOutageInitialized = false;

            this.stateManager = stateManager;
            this.stateManager.StateManagerChanged += this.OnStateManagerChangedHandler;
        }
 public IsolateOutageService(OutageModel outageModel)
 {
     this.outageModel    = outageModel;
     dbContext           = outageModel.dbContext;
     outageMessageMapper = new OutageMessageMapper();
     proxyFactory        = new ProxyFactory();
 }
 public ReportOutageService(OutageModel outageModel)
 {
     this.outageModel    = outageModel;
     dbContext           = outageModel.dbContext;
     outageMessageMapper = new OutageMessageMapper();
     recloserOutageMap   = new Dictionary <long, Dictionary <long, List <long> > >();
 }
        public OutageResolutionProvider(IReliableStateManager stateManager, OutageLifecycleHelper lifecycleHelper)
        {
            this.baseLogString = $"{this.GetType()} [{this.GetHashCode()}] =>{Environment.NewLine}";

            this.lifecycleHelper     = lifecycleHelper;
            this.outageMessageMapper = new OutageMessageMapper();

            this.isOutageTopologyModelInitialized = false;

            this.stateManager = stateManager;
            this.stateManager.StateManagerChanged += this.OnStateManagerChangedHandler;
        }
Exemplo n.º 6
0
        public IEnumerable <ArchivedOutageMessage> GetArchivedOutages()
        {
            OutageMessageMapper mapper = new OutageMessageMapper();

            List <ArchivedOutageMessage> archivedOutages = new List <ArchivedOutageMessage>();

            using (UnitOfWork db = new UnitOfWork())
            {
                archivedOutages.AddRange(mapper.MapOutageEntitiesToArchived(db.OutageRepository.GetAllArchived()));
            }

            return(archivedOutages);
        }
        public OutageIsolationProvider(IReliableStateManager stateManager, OutageLifecycleHelper lifecycleHelper, ModelResourcesDesc modelResourcesDesc)
        {
            this.baseLogString = $"{this.GetType()} [{this.GetHashCode()}] =>{Environment.NewLine}";

            this.lifecycleHelper     = lifecycleHelper;
            this.modelResourcesDesc  = modelResourcesDesc;
            this.outageMessageMapper = new OutageMessageMapper();

            this.isMonitoredHeadBreakerMeasurementsInitialized = false;
            this.isStartedIsolationAlgorithmsInitialized       = false;

            this.stateManager = stateManager;
            this.stateManager.StateManagerChanged += this.OnStateManagerChangedHandler;
        }
        public CrewSendingProvider(IReliableStateManager stateManager, OutageLifecycleHelper lifecycleHelper)
        {
            this.baseLogString = $"{this.GetType()} [{this.GetHashCode()}] =>{Environment.NewLine}";

            this.lifecycleHelper     = lifecycleHelper;
            this.outageMessageMapper = new OutageMessageMapper();

            this.isOutageTopologyModelInitialized = false;
            this.isCommandedElementsInitialized   = false;
            this.isElementsToBeIgnoredInReportPotentialOutageInitialized = false;

            this.stateManager = stateManager;
            this.stateManager.StateManagerChanged += this.OnStateManagerChangedHandler;
        }
Exemplo n.º 9
0
        public OutageModel()
        {
            proxyFactory           = new ProxyFactory();
            commandedElements      = new HashSet <long>();
            optimumIsolationPoints = new HashSet <long>();
            outageMessageMapper    = new OutageMessageMapper();
            modelResourcesDesc     = new ModelResourcesDesc();
            recloserOutageMap      = new Dictionary <long, Dictionary <long, List <long> > >();
            PotentialOutage        = new Queue <Tuple <long, CommandOriginType> >();

            dbContext = new UnitOfWork();

            CalledOutages = new List <long>();
            EmailMsg      = new ConcurrentQueue <long>();

            ImportTopologyModel();
            SubscribeToOMSTopologyPublications();
        }
        public IsolationAlgorithmCycle(IReliableStateManager stateManager, OutageLifecycleHelper lifecycleHelper, int cycleInterval, int cycleUpperLimit)
        {
            this.baseLogString = $"{this.GetType()} [{this.GetHashCode()}] =>{Environment.NewLine}";

            this.lifecycleHelper     = lifecycleHelper;
            this.outageMessageMapper = new OutageMessageMapper();
            this.cycleInterval       = cycleInterval;
            this.cycleUpperLimit     = cycleUpperLimit;

            this.isStartedIsolationAlgorithmsInitialized       = false;
            this.isMonitoredHeadBreakerMeasurementsInitialized = false;
            this.isOutageTopologyModelInitialized    = false;
            this.isOptimumIsolationPointsInitialized = false;
            this.isCommandedElementsInitialized      = false;

            this.stateManager = stateManager;
            this.stateManager.StateManagerChanged += this.OnStateManagerChangedHandler;
        }
 public ResolveOutageService(OutageModel outageModel)
 {
     this.outageModel    = outageModel;
     dbContext           = outageModel.dbContext;
     outageMessageMapper = new OutageMessageMapper();
 }
Exemplo n.º 12
0
 public ValidateResolveConditionsService(OutageModel outageModel)
 {
     this.outageModel    = outageModel;
     dbContext           = outageModel.dbContext;
     outageMessageMapper = new OutageMessageMapper();
 }
Exemplo n.º 13
0
 public EquipmentMapper(OutageMessageMapper outageMapper)
 {
     this.outageMapper = outageMapper;
 }
 public ConsumerMessageMapper(OutageMessageMapper outageMapper)
 {
     this.outageMapper = outageMapper;
 }