public final BytesRef[] getBinaryValues(String name) {final List<BytesRef> result = new ArrayList<>();for (IndexableField field : fields) {if (field.name().equals(name)) {final BytesRef bytes = field.binaryValue();if (bytes != null) {result.add(bytes);}}}return result.toArray(new BytesRef[result.size()]);}
public BytesRef[] GetBinaryValues(string name){var result = new List<BytesRef>();foreach (IIndexableField field in fields){if (field.Name.Equals(name, StringComparison.Ordinal)){BytesRef bytes = field.GetBinaryValue();if (bytes != null){result.Add(bytes);}}}return result.ToArray();}