ActiveRecordPattern.ActiveRecordBase.propertyKeyName C# (CSharp) 메소드

propertyKeyName() 보호된 정적인 메소드

protected static propertyKeyName ( Type Type ) : string
Type System.Type
리턴 string
        protected static string propertyKeyName(Type Type)
        {
            PropertyInfo[] properies = Type.GetProperties();
            foreach (PropertyInfo property in properies)
            {
                if (Attribute.IsDefined(property, typeof(PropertyKeyRecord)))
                {
                    var attributeValue =
                        Attribute.GetCustomAttribute(property, typeof(PropertyKeyRecord)) as PropertyKeyRecord;

                    if (attributeValue.Name != null) return attributeValue.Name;
                    else return property.Name;
                }
            }

            return null;
        }