Ejemplo n.º 1
0
 public virtual void Process(InitializePlantArgs args)
 {
     IPlant plant = args.IPlantObject;
       if (plant.Description.IsNullOrEmpty() || plant.HumanSupportingName.IsNullOrEmpty())
       {
     Log.Warn("Plant '{0}' doesn't provide correct name and description. It will be disabed".FormatWith(args.PlantID), this);
     args.Abort();
     args.ResolvedPlantEx = null;
       }
 }
Ejemplo n.º 2
0
        public virtual void Process(InitializePlantArgs args)
        {
            IPlant plant = args.IPlantObject;

            if (plant.Description.IsNullOrEmpty() || plant.HumanSupportingName.IsNullOrEmpty())
            {
                Log.Warn("Plant '{0}' doesn't provide correct name and description. It will be disabed".FormatWith(args.PlantID), this);
                args.Abort();
                args.ResolvedPlantEx = null;
            }
        }
Ejemplo n.º 3
0
 public virtual void Process(InitializePlantArgs args)
 {
     var iPlant = args.PlantObject as IPlant;
       if (iPlant != null)
       {
     args.IPlantObject = iPlant;
       }
       else
       {
     args.Abort();
       }
 }
Ejemplo n.º 4
0
 public virtual void Process(InitializePlantArgs args)
 {
     IPlant plant = args.IPlantObject;
       try
       {
     plant.Initialize();
       }
       catch (Exception ex)
       {
     Log.Error("Unable to initialize plant {0}".FormatWith(plant.GetType()), ex, this);
     args.Abort();
       }
 }
Ejemplo n.º 5
0
        public virtual void Process(InitializePlantArgs args)
        {
            var iPlant = args.PlantObject as IPlant;

            if (iPlant != null)
            {
                args.IPlantObject = iPlant;
            }
            else
            {
                args.Abort();
            }
        }
Ejemplo n.º 6
0
        public virtual void Process(InitializePlantArgs args)
        {
            IPlant plant = args.IPlantObject;

            try
            {
                plant.Initialize();
            }
            catch (Exception ex)
            {
                Log.Error("Unable to initialize plant {0}".FormatWith(plant.GetType()), ex, this);
                args.Abort();
            }
        }