| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 3 | | // license information. |
| | 4 | |
|
| | 5 | | namespace Microsoft.Azure.Search.Models |
| | 6 | | { |
| | 7 | | /// <summary> |
| | 8 | | /// Defines extension methods for <c cref="DataType">DataType</c>. |
| | 9 | | /// </summary> |
| | 10 | | public static class DataTypeExtensions |
| | 11 | | { |
| | 12 | | /// <summary> |
| | 13 | | /// Indicates whether or not the given data type is a complex type. |
| | 14 | | /// </summary> |
| | 15 | | /// <param name="dataType">The data type to check.</param> |
| | 16 | | /// <returns> |
| | 17 | | /// <c>true</c> if the type represents a complex object or collection of complex objects; <c>false</c> otherwise |
| | 18 | | /// </returns> |
| | 19 | | public static bool IsComplex(this DataType dataType) => |
| 86242 | 20 | | dataType == DataType.Complex || dataType == DataType.Collection(DataType.Complex); |
| | 21 | | } |
| | 22 | | } |