コード例 #1
0
 public static CodeMemberProperty WithSetIgnoresNull(this CodeMemberProperty property, CodeFieldReferenceExpression fieldRef)
 => property.WithSet(
     Statement.If(Expression.PropertySetValue.IsNotNull(),
                  Then: fieldRef.Assign(Expression.PropertySetValue)));
コード例 #2
0
 public static CodeMemberProperty WithSet(this CodeMemberProperty property, CodeExpression backingFieldRef)
 => property.WithSet(backingFieldRef.Assign(Expression.PropertySetValue));