public virtual void Process(ResolveSinglePlantVMPipelineArgs args)
        {
            var serviceInstance =
                (TServiceType)(HatcherGuide <IServicesSteward> .Instance.Services.FirstOrDefault(x => x.GetType() == typeof(TServiceType)));

            if (serviceInstance == null)
            {
                Log.Warn("Service of type '{0}' wasn't found".FormatWith(typeof(TServiceType)), this);
                return;
            }
            if (!serviceInstance.IsActuallyEnabled)
            {
                return;
            }
            bool isAvailableForPlant = serviceInstance.IsAvailableForPlant(args.PlantEx);

            if (!isAvailableForPlant)
            {
                return;
            }
            ServiceForPlantVMBase serviceForPlantVMBase = this.GetServiceVM(serviceInstance, args.PlantEx);

            if (serviceForPlantVMBase != null)
            {
                args.PlantVM.ServicesVM.Add(serviceForPlantVMBase);
            }
        }
Esempio n. 2
0
 public virtual void Process(ResolveSinglePlantVMPipelineArgs args)
 {
     args.PlantVM = new SinglePlantVM();
       args.PlantVM.InitPlantVMWithPlantEx(args.PlantEx);
 }
        public static SinglePlantVM Run(ResolveSinglePlantVMPipelineArgs args)
        {
            HatcherGuide <IPipelineManager> .Instance.InvokePipeline("resolveSinglePlantVM", args);

            return(!args.Aborted ? args.PlantVM : null);
        }
Esempio n. 4
0
 public virtual void Process(ResolveSinglePlantVMPipelineArgs args)
 {
     args.PlantVM = new SinglePlantVM();
     args.PlantVM.InitPlantVMWithPlantEx(args.PlantEx);
 }
 public static SinglePlantVM Run(ResolveSinglePlantVMPipelineArgs args)
 {
     HatcherGuide<IPipelineManager>.Instance.InvokePipeline("resolveSinglePlantVM", args);
       return !args.Aborted ? args.PlantVM : null;
 }