BuildingCoder.CmdListAllRooms.DistinguishRoom C# (CSharp) Метод

DistinguishRoom() приватный Метод

Distinguish 'Not Placed', 'Redundant' and 'Not Enclosed' rooms.
private DistinguishRoom ( Room room ) : RoomState
room Room
Результат RoomState
        RoomState DistinguishRoom( Room room )
        {
            RoomState res = RoomState.Unknown;

              if( room.Area > 0 )
              {
            // Placed if having Area

            res = RoomState.Placed;
              }
              else if( null == room.Location )
              {
            // No Area and No Location => Unplaced

            res = RoomState.NotPlaced;
              }
              else
              {
            // must be Redundant or NotEnclosed

            SpatialElementBoundaryOptions opt
              = new SpatialElementBoundaryOptions();

            IList<IList<BoundarySegment>> segs
              = room.GetBoundarySegments( opt );

            res = ( null == segs || segs.Count == 0 )
              ? RoomState.NotEnclosed
              : RoomState.Redundant;
              }
              return res;
        }