Skip to content

Instantly share code, notes, and snippets.

@zgramana
Last active December 18, 2015 03:19
Show Gist options
  • Save zgramana/5717827 to your computer and use it in GitHub Desktop.
Save zgramana/5717827 to your computer and use it in GitHub Desktop.
makes copy ctor
// References:
// - MyPreviouslyAdded.dll
// - MyGacced.dll
// Imports:
// - My.Namespace.Bitches
// - My.Other.Namespace
P("public Version(Version item)");
P("{");
var t = typeof(Version);
var props = t.GetProperties();
foreach(var prop in props)
{
P(" this.{0} = item.{0};", prop.Name);
}
P("}");
@zgramana
Copy link
Author

zgramana commented Jun 5, 2013

Configure namespace usings and assm refs via YAML in the header comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment