public static CodeMemberProperty WithSetIgnoresNull(this CodeMemberProperty property, CodeFieldReferenceExpression fieldRef) => property.WithSet( Statement.If(Expression.PropertySetValue.IsNotNull(), Then: fieldRef.Assign(Expression.PropertySetValue)));
public static CodeMemberProperty WithSet(this CodeMemberProperty property, CodeExpression backingFieldRef) => property.WithSet(backingFieldRef.Assign(Expression.PropertySetValue));