Skip to content

Instantly share code, notes, and snippets.

@dbuksbaum
Last active January 17, 2016 05:03
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 dbuksbaum/552626 to your computer and use it in GitHub Desktop.
Save dbuksbaum/552626 to your computer and use it in GitHub Desktop.
ReSharper File Template to create Caliburn.Micro View-Models
<TemplatesExport family="File Templates">
<Template uid="3d240306-9708-46d9-955c-4f06c2f803a7"
shortcut=""
description="Caliburn Micro View Model"
text="using System;&#xD;&#xA;using Caliburn.Micro;&#xD;&#xA;using $ROOTNAMESPACE$.Messages;&#xD;&#xA;&#xD;&#xA;namespace $NAMESPACE$&#xD;&#xA;{&#xD;&#xA; public class $CLASS$ : $BASECLASS$&#xD;&#xA; {&#xD;&#xA; #region Fields&#xD;&#xA; private readonly IEventAggregator _messageBus;&#xD;&#xA; #endregion&#xD;&#xA; &#xD;&#xA; #region Constructors&#xD;&#xA; public $CLASS$(IEventAggregator messageBus)&#xD;&#xA; {&#xD;&#xA; _messageBus = messageBus;&#xD;&#xA; // Uncomment this if you want to handle any messages&#xD;&#xA; //_messageBus.Subscribe(this);&#xD;&#xA; }&#xD;&#xA; #endregion&#xD;&#xA; $END$&#xD;&#xA; }&#xD;&#xA;}"
reformat="True"
shortenQualifiedReferences="True">
<Context>
<ProjectLanguageContext language="CSharp" />
</Context>
<Categories />
<Variables>
<Variable name="NAMESPACE" expression="fileDefaultNamespace()" initialRange="-1" />
<Variable name="ROOTNAMESPACE" expression="getDefaultNamespace()" initialRange="-1" />
<Variable name="CLASS" expression="getFileNameWithoutExtension()" initialRange="-1" />
<Variable name="BASECLASS" expression="list(&quot;PropertyChangedBase, Screen, Conductor&lt;T&gt;, Conductor&lt;T&gt;.Collection.OneActive&quot;)" initialRange="0" />
</Variables>
<CustomProperties>
<Property key="FileName" value="Class" />
<Property key="Extension" value="cs" />
<Property key="ValidateFileName" value="True" />
</CustomProperties>
</Template>
</TemplatesExport>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment