private static IAGLink4 VerifyConnectivity(AgLinkPlc plc, ICollection <IPlcItem> plcItems, PlcItemUsageType usageType) { var underlyingPlc = plc.UnderlyingPlc; if (underlyingPlc is null) { var itemDescriptions = Plc.GetPlcItemDescription(plcItems); throw new NotConnectedPlcException($"Cannot {usageType.ToString().ToLower()} the plc items ({itemDescriptions}) because {plc:LOG} is not connected. All items will be put on hold."); } return(underlyingPlc); }