I have setup this File Template in ReSharper 7.0.1
using System;
using System.Collections.Generic;
using System.Linq;
using MyProject.Infrastructure.Messaging;
namespace $NAMESPACE$
{
public class $CLASS$Command : ICommand<$CLASS$Command.Result>
{
$END$
public class Result
{
}
}
public class $CLASS$Handler : ICommandHandler<$CLASS$Command, $CLASS$Command.Result>
{
public $CLASS$Command.Result Process($CLASS$Command c)
{
var result = new $CLASS$Command.Result {};
return result;
}
}
}
When I create a file based on the template, only some of the $CLASS$ variable instances are populated correctly. In the instances where $CLASS$ is used in $CLASS$Command.Result, $CLASS$ is replaced with the letter a instead of the expected value, like so.
using System;
using System.Collections.Generic;
using System.Linq;
using MyProject.Infrastructure.Messaging;
namespace MyProject.Domain.AnEntity.Commands
{
public class Test2Command : ICommand<aCommand.Result>
{
public class Result
{
}
}
public class Test2Handler : ICommandHandler<Test2Command, aCommand.Result>
{
public aCommand.Result Process(Test2Command c)
{
var result = new aCommand.Result {};
return result;
}
}
}
I cannot see a reason why this isn’t working. Does anyone know what I’m doing wrong here?
This apparently is a bug in certain versions of ReSharper, and is currently in the queue for a fix as best I can tell.
http://youtrack.jetbrains.com/issue/RSRP-334501