public static CodeMemberProperty WithGetSet(this CodeMemberProperty property, CodeFieldReferenceExpression backingFieldRef) => property.WithGet(backingFieldRef.Return()) .WithSet(backingFieldRef.Assign(Expression.PropertySetValue));
public static CodeMemberProperty WithGetLazyInitialize(this CodeMemberProperty property, CodeFieldReferenceExpression fieldRef, CodeExpression init) => property.WithGet( Statement.If(fieldRef.IsNull(), Then: fieldRef.Assign(init)), Statement.Return(fieldRef));
public static CodeMemberProperty WithGet(this CodeMemberProperty property, CodeFieldReferenceExpression backingFieldRef) => property.WithGet(backingFieldRef.Return());