Skip to content

Instantly share code, notes, and snippets.

@fmork
Created August 29, 2012 08:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fmork/3508662 to your computer and use it in GitHub Desktop.
Save fmork/3508662 to your computer and use it in GitHub Desktop.
Structured search/replace problem
// going from this:
[DataMember]
public string SomeProperty { get; set; )
// ...should lead to this (adding Name property of attribute, using property name, but camel cased):
[DataMember(Name = "someProperty")]
public string SomeProperty { get; set; }
// This should not affect other attributes, so this:
[DataMember]
[Whatever]
public string SomeProperty { get; set; )
// ... should become this:
[DataMember(Name = "someProperty")]
[Whatever]
public string SomeProperty { get; set; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment