public static ILabelWriter WriteLabels( this ILabelWriter labelWriter, IReadOnlyList <string> labelNames, IReadOnlyList <string> labelValues ) { if (labelNames == null) { throw new ArgumentNullException(nameof(labelNames)); } if (labelValues == null) { throw new ArgumentNullException(nameof(labelValues)); } if (labelNames.Count != labelValues.Count) { throw new InvalidOperationException("Label names and values does not match"); } for (int i = 0; i < labelNames.Count; i++) { labelWriter.WriteLabel(labelNames[i], labelValues[i]); } return(labelWriter); }
public static ILabelWriter WriteLabels( this ILabelWriter labelWriter, KeyValuePair <string, string>[] labels ) { for (int i = 0; i < labels.Length; i++) { labelWriter.WriteLabel(labels[i].Key, labels[i].Value); } return(labelWriter); }
public static ILabelWriter WriteLabels( this ILabelWriter labelWriter, IReadOnlyList <KeyValuePair <string, string> > labels ) { for (int i = 0; i < labels.Count; i++) { labelWriter.WriteLabel(labels[i].Key, labels[i].Value); } return(labelWriter); }