There is little use of the regular replacement of VS, which is most recently due to the need to add a large number of default values, but do not want to re-class.
1. Replace the attribute with///description
To find a regular expression:
<summary> (.) *((.| \ n}) {1,2}///(. { 1,}) ((.) *((.| \ n) {1,2}///})) {</summary> (.) *((.| \ n}) {1,2}public string (. { 1,}) {get; set;}
Regular expression to replace:
private string _$14;\n///<summary>\n///$5\n///</summary>\n public string $14 {\nget\n{\nif (string. Isnullorwhitespace (_$14)) \n{\n _$14 = ""; \ n} \nreturn _$14; \ n} \nset \n{\n _$14 = value; \ n} \ n}
Where $ $ ... $n, representing the first few matches, many times it may not be correct when you calculate it, so it's in place of the replacement: $1;$2; $n so you can be very intuitive to know that is the value you want, in the above substitution expression is the comment content, $14 is the attribute name;
2. Replace the attributes that are not annotated
To find a regular expression:
public string (. { 1,}) {get; set;}
Regular expression to replace:
\nprivate string _$1;\n///<summary>\n///$1\n///</summary>\n public string $ {\nget\n{\nif (string. Isnullorwhitespace (_$1)) \n{\n _$1 = ""; \ n} \nreturn _$1; \ n} \nset \n{\n _$1 = value; \ n} \ n}
This just describes a simple usage.
VS Regular Expression Replace content