diff --git a/Orm/Xtensive.Orm/Reflection/AttributeHelper.cs b/Orm/Xtensive.Orm/Reflection/AttributeHelper.cs index 647ca4951..e886094f7 100644 --- a/Orm/Xtensive.Orm/Reflection/AttributeHelper.cs +++ b/Orm/Xtensive.Orm/Reflection/AttributeHelper.cs @@ -68,7 +68,7 @@ private static void AddAttributesFromBase(ref TAttribute[] attributes, MemberInf } } - public static TAttribute[] Get(MemberInfo member, AttributeSearchOptions options) => + internal static TAttribute[] Get(MemberInfo member, AttributeSearchOptions options) => Dictionary.GetOrAdd(new PerAttributeKey(member.MetadataToken, member.Module.ModuleHandle, options), ExtractAttributesByKey, member); } @@ -79,7 +79,7 @@ public static TAttribute[] Get(MemberInfo member, AttributeSearchOptions options /// Member to get attributes of. /// Attribute search options. /// An array of attributes of specified type. - public static IReadOnlyList GetAttributes(this MemberInfo member, AttributeSearchOptions options = AttributeSearchOptions.InheritNone) + internal static IReadOnlyList GetAttributes(this MemberInfo member, AttributeSearchOptions options = AttributeSearchOptions.InheritNone) where TAttribute : Attribute => AttributeDictionary.Get(member, options); /// @@ -94,7 +94,7 @@ public static IReadOnlyList GetAttributes(this MemberInf /// throws , if there is more then one attribute of specified type found. /// /// Thrown if there is more then one attribute of specified type found. - public static TAttribute GetAttribute(this MemberInfo member, AttributeSearchOptions options = AttributeSearchOptions.InheritNone) + internal static TAttribute GetAttribute(this MemberInfo member, AttributeSearchOptions options = AttributeSearchOptions.InheritNone) where TAttribute : Attribute { var attributes = AttributeDictionary.Get(member, options);