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; } }
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; } }
public virtual void Process(InitializePlantArgs args) { var iPlant = args.PlantObject as IPlant; if (iPlant != null) { args.IPlantObject = iPlant; } else { args.Abort(); } }
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(); } }
public virtual void Process(InitializePlantArgs args) { var iPlant = args.PlantObject as IPlant; if (iPlant != null) { args.IPlantObject = iPlant; } else { args.Abort(); } }
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(); } }