BuildingCoder.CmdSetRoomOccupancy.BumpOccupancy C# (CSharp) Метод

BumpOccupancy() статический приватный Метод

Read the value of the element ROOM_OCCUPANCY parameter. If it ends in a number, increment the number, else append "1".
static private BumpOccupancy ( Element e ) : void
e Element
Результат void
        static void BumpOccupancy( Element e )
        {
            Parameter p = e.get_Parameter(
            BuiltInParameter.ROOM_OCCUPANCY );

              if( null == p )
              {
            Debug.Print(
              "{0} has no room occupancy parameter.",
              Util.ElementDescription( e ) );
              }
              else
              {
            string occupancy = p.AsString();

            string newOccupancy = BumpStringSuffix(
              occupancy );

            p.Set( newOccupancy );
              }
        }