private void WriteShape(IGeoShape shape, IFieldLookup indexedField, Field field, string queryType) { // ReSharper disable UnusedVariable switch (shape) { case null when indexedField != null: Write("geo_indexed_shape"); break; case ICircleGeoShape circleGeoShape: Write("geo_shape_circle"); break; case IEnvelopeGeoShape envelopeGeoShape: Write("geo_shape_envelope"); break; case IGeometryCollection geometryCollection: Write("geo_shape_geometrycollection"); break; case ILineStringGeoShape lineStringGeoShape: Write("geo_shape_linestring"); break; case IMultiLineStringGeoShape multiLineStringGeoShape: Write("geo_shape_multi_linestring"); break; case IMultiPointGeoShape multiPointGeoShape: Write("geo_shape_multi_point"); break; case IMultiPolygonGeoShape multiPolygonGeoShape: Write("geo_shape_multi_polygon"); break; case IPointGeoShape pointGeoShape: Write("geo_shape_point"); break; case IPolygonGeoShape polygonGeoShape: Write("geo_shape_polygon"); break; // ReSharper restore UnusedVariable default: Write(queryType, field); break; } }
internal static bool IsConditionless(this IFieldLookup fieldLookup) => fieldLookup == null || fieldLookup.Id == null || fieldLookup.Index == null || fieldLookup.Type == null || fieldLookup.Path == null;