static void Main() { var metadata = new Metadata <My1>(); Console.WriteLine( $"{metadata.GetProperyName(_ => _.A001)} " + $"{metadata.GetProperyName(_ => _.A002)} " + $"{metadata.GetProperyName(_ => _.A003)} " + $"{QuickName.GetProperyInfo(() => My3.A011).Name} " + $"{QuickName.GetProperyInfo(() => My3.A012).Name}"); }
public override int GetHashCode() { unchecked { var hashCode = Id.GetHashCode(); hashCode = (hashCode * 397) ^ (FirstName != null ? FirstName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (LastName != null ? LastName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (QuickName != null ? QuickName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (PhoneNumber != null ? PhoneNumber.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (AccountReference != null ? AccountReference.GetHashCode() : 0); return(hashCode); } }
public static PropertyInfo GetProperyInfo <T, TPropery>(this Metadata <T> metadata, Func <T, TPropery> func) => QuickName.GetProperyInfo(func);