Welcome Guest, you are in: Login

wiki.TheThoughtfulCoder.com

RSS RSS

Navigation




Search the wiki
»



PoweredBy

© 2010 Nathan Fox

CodeRush Templates

RSS
Modified on 08/01/2010 22:58 by Administrator Categorized as Uncategorized

CodeRush Templates

These are templates I've created for CodeRush that can be reused by others. If you want all the templates listed with contexts and all you can download the CShart_TTC.zip file attached to this page (use the Attachments button at the top of this page). It contains the file CShare_TTC.xml, which you can import into your CodeRush templates.

LLBLGen Pro template

Template to declare an EntityCollection.
Template: ec
EntityCollection<«Cursor»«FieldStart»«Link(Entity)»«FieldEnd»> entities = new EntityCollection<«Link(Entity)»>();«Target»

Moq templates

Template to start It.Is<>() function.
Template: ii
It.Is<«Caret»

Template to start It.IsAny<>() function.
Template: iia
It.IsAny<«Caret»

Template to create MockBehavior.Strict .
Template: mbs
MockBehavior.Strict

Template to create mock variable.
Template: mk
Mock<«Caret»«FieldStart»«Link(Interface)»«FieldEnd»«BlockAnchor»> mock«Link(Interface)» = new Mock<«Link(Interface)»>(MockBehavior.Strict);«Target»

Template to create mock Setup and Returns.
Template: mks
«Caret»mockVar«BlockAnchor».Setup(m => m«HardMarker»).Returns(«HardMarker»);«HardMarker»

StructureMap templates

Template to create ObjectFactory.Get() call.
Template: ofg
ObjectFactory.GetInstance<«Caret»«Field(Interface,Enter interface here.)»«BlockAnchor»>()

Template to create ObjectFactory.Inject() call.
Template: ofi
ObjectFactory.Inject<«Caret»«Field(Interface,Enter interface here.)»«BlockAnchor»>(«Field(,Enter any parameters)»);«FinalTarget»
  Name Size
- CSharp_TTC.zip 3.05 KB