コード例 #1
0
ファイル: Crane.cs プロジェクト: II01/i2MFCSv2.TAI
 protected IConveyorIO FindOutConveyor(string name)
 {
     try
     {
         return(OutConveyor.Find(prop => prop.Name == name) as IConveyorIO);
     }
     catch (Exception ex)
     {
         Warehouse.AddEvent(Event.EnumSeverity.Error, Event.EnumType.Exception, ex.Message);
         throw new CraneException(String.Format("{0} Crane.FindOutConveyor failed {1}", Name, name));
     }
 }
コード例 #2
0
ファイル: Crane.cs プロジェクト: II01/i2MFCSv2.TAI
 protected IConveyorIO FindInOutConveyor(string name)
 {
     try
     {
         if (InConveyor != null && InConveyor.Exists(prop => prop.Name == name))
         {
             return(InConveyor.Find(prop => prop.Name == name) as IConveyorIO);
         }
         if (OutConveyor != null && OutConveyor.Exists(prop => prop.Name == name))
         {
             return(OutConveyor.Find(prop => prop.Name == name) as IConveyorIO);
         }
         throw new Exception();
     }
     catch (Exception ex)
     {
         Warehouse.AddEvent(Event.EnumSeverity.Error, Event.EnumType.Exception, ex.Message);
         throw new CraneException(String.Format("{0} Crane.FindInOutConveyor failed ({1})", Name, name));
     }
 }