BaseJump.Core.Metadata.ModelMetadataProvider.GetFirstLevelAttributeType C# (CSharp) Method

GetFirstLevelAttributeType() private method

private GetFirstLevelAttributeType ( Type attributeType ) : Type
attributeType System.Type
return System.Type
        private Type GetFirstLevelAttributeType(Type attributeType)
        {
            var next = attributeType;
            while (next != typeof(Attribute) && next != typeof(Object) && next != null)
            {
                attributeType = next;
                next = next.GetTypeInfo().BaseType;
            }
            return attributeType;
        }
    }