private string GetDisplayTitle(WebPart part, ConnectionPoint connectionPoint, bool isConsumer) {
            if (part == null) {
                return SR.GetString(SR.Part_Unknown);
            }

            int connectionPointCount = isConsumer ?
                WebPartManager.GetConsumerConnectionPoints(part).Count :
                WebPartManager.GetProviderConnectionPoints(part).Count;

            if (connectionPointCount == 1) {
                return part.DisplayTitle;
            }
            else {
                return part.DisplayTitle + " (" +
                    (connectionPoint != null ?
                     connectionPoint.DisplayName :
                     SR.GetString(SR.Part_Unknown)) + ")";
            }
        }
 private string GetDisplayTitle(WebPart part, ConnectionPoint connectionPoint, bool isConsumer)
 {
     if (part == null)
     {
         return System.Web.SR.GetString("Part_Unknown");
     }
     int num = isConsumer ? base.WebPartManager.GetConsumerConnectionPoints(part).Count : base.WebPartManager.GetProviderConnectionPoints(part).Count;
     if (num == 1)
     {
         return part.DisplayTitle;
     }
     return (part.DisplayTitle + " (" + ((connectionPoint != null) ? connectionPoint.DisplayName : System.Web.SR.GetString("Part_Unknown")) + ")");
 }