BuildingCoder.CmdRectDuctCorners.GetFirstRectangularConnector C# (CSharp) Method

GetFirstRectangularConnector() static private method

Return the first rectangular connector of the given duct element.
static private GetFirstRectangularConnector ( Duct duct, Connector &c1 ) : bool
duct Duct
c1 Connector
return bool
        static bool GetFirstRectangularConnector(
            Duct duct,
            out Connector c1)
        {
            c1 = null;

              ConnectorSet connectors
            = duct.ConnectorManager.Connectors;

              if( 0 < connectors.Size )
              {
            foreach( Connector c in connectors )
            {
              if( ConnectorProfileType.Rectangular
            == c.Shape )
              {
            c1 = c;
            break;
              }
              else
              {
            Trace.WriteLine( "Connector shape: "
              + c.Shape );
              }
            }
              }
              return null != c1;
        }