< Summary

Class:Azure.Data.Tables.Queryable.ReflectionUtil
Assembly:Azure.Data.Tables
File(s):C:\Git\azure-sdk-for-net\sdk\tables\Azure.Data.Tables\src\Queryable\ReflectionUtil.cs
Covered lines:32
Uncovered lines:0
Coverable lines:32
Total lines:49
Line coverage:100% (32 of 32)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_DictionaryGetItemMethodInfo()-100%100%
get_DynamicDictionaryGetItemMethodInfo()-100%100%
get_DynamicDictionaryGetBinaryMethodInfo()-100%100%
get_DynamicDictionaryGetBooleanMethodInfo()-100%100%
get_DynamicDictionaryGetDateTimeMethodInfo()-100%100%
get_DynamicDictionaryGetDoubleMethodInfo()-100%100%
get_DynamicDictionaryGetGuidMethodInfo()-100%100%
get_DynamicDictionaryGetInt32MethodInfo()-100%100%
get_DynamicDictionaryGetInt64MethodInfo()-100%100%
get_DynamicDictionaryGetString64MethodInfo()-100%100%
.cctor()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\tables\Azure.Data.Tables\src\Queryable\ReflectionUtil.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System.Collections.Generic;
 5using System.Reflection;
 6
 7namespace Azure.Data.Tables.Queryable
 8{
 9    internal static class ReflectionUtil
 10    {
 211        private static MethodInfo DictionaryGetItemMethodInfo { get; }
 212        private static MethodInfo DynamicDictionaryGetItemMethodInfo { get; }
 213        private static MethodInfo DynamicDictionaryGetBinaryMethodInfo { get; }
 214        private static MethodInfo DynamicDictionaryGetBooleanMethodInfo { get; }
 215        private static MethodInfo DynamicDictionaryGetDateTimeMethodInfo { get; }
 216        private static MethodInfo DynamicDictionaryGetDoubleMethodInfo { get; }
 217        private static MethodInfo DynamicDictionaryGetGuidMethodInfo { get; }
 218        private static MethodInfo DynamicDictionaryGetInt32MethodInfo { get; }
 219        private static MethodInfo DynamicDictionaryGetInt64MethodInfo { get; }
 220        private static MethodInfo DynamicDictionaryGetString64MethodInfo { get; }
 21
 222        internal static HashSet<MethodInfo> s_dictionaryMethodInfosHash = new HashSet<MethodInfo>();
 23
 24        static ReflectionUtil()
 25        {
 226            DictionaryGetItemMethodInfo = typeof(IDictionary<string, object>).GetMethod("get_Item");
 227            DynamicDictionaryGetItemMethodInfo = typeof(TableEntity).GetMethod("get_Item");
 228            DynamicDictionaryGetBinaryMethodInfo = typeof(TableEntity).GetMethod(nameof(TableEntity.GetBinary));
 229            DynamicDictionaryGetBooleanMethodInfo = typeof(TableEntity).GetMethod(nameof(TableEntity.GetBoolean));
 230            DynamicDictionaryGetDateTimeMethodInfo = typeof(TableEntity).GetMethod(nameof(TableEntity.GetDateTime));
 231            DynamicDictionaryGetDoubleMethodInfo = typeof(TableEntity).GetMethod(nameof(TableEntity.GetDouble));
 232            DynamicDictionaryGetGuidMethodInfo = typeof(TableEntity).GetMethod(nameof(TableEntity.GetGuid));
 233            DynamicDictionaryGetInt32MethodInfo = typeof(TableEntity).GetMethod(nameof(TableEntity.GetInt32));
 234            DynamicDictionaryGetInt64MethodInfo = typeof(TableEntity).GetMethod(nameof(TableEntity.GetInt64));
 235            DynamicDictionaryGetString64MethodInfo = typeof(TableEntity).GetMethod(nameof(TableEntity.GetString));
 36
 237            s_dictionaryMethodInfosHash.Add(DictionaryGetItemMethodInfo);
 238            s_dictionaryMethodInfosHash.Add(DynamicDictionaryGetItemMethodInfo);
 239            s_dictionaryMethodInfosHash.Add(DynamicDictionaryGetBinaryMethodInfo);
 240            s_dictionaryMethodInfosHash.Add(DynamicDictionaryGetBooleanMethodInfo);
 241            s_dictionaryMethodInfosHash.Add(DynamicDictionaryGetDateTimeMethodInfo);
 242            s_dictionaryMethodInfosHash.Add(DynamicDictionaryGetDoubleMethodInfo);
 243            s_dictionaryMethodInfosHash.Add(DynamicDictionaryGetGuidMethodInfo);
 244            s_dictionaryMethodInfosHash.Add(DynamicDictionaryGetInt32MethodInfo);
 245            s_dictionaryMethodInfosHash.Add(DynamicDictionaryGetInt64MethodInfo);
 246            s_dictionaryMethodInfosHash.Add(DynamicDictionaryGetString64MethodInfo);
 247        }
 48    }
 49}