Remove boxing of chars when concatenated with strings

This commit is contained in:
Bruce Bowyer-Smyth 2015-01-01 16:16:29 +10:00 committed by Doug Bunting
parent 95ae4cb3a5
commit af9e9f9113
6 changed files with 7 additions and 7 deletions

View File

@ -130,7 +130,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels
}
// Both templates contain some text.
return left + '/' + right;
return left + "/" + right;
}
private static bool IsOverridePattern(string template)

View File

@ -21,7 +21,7 @@ namespace Microsoft.AspNet.Mvc.Razor.Directives
/// <param name="modelType">The model type to be used to replace &lt;TModel&gt; tokens.</param>
public InjectChunkMerger([NotNull] string modelType)
{
_modelType = '<' + modelType + '>';
_modelType = "<" + modelType + ">";
}
/// <inheritdoc />

View File

@ -19,7 +19,7 @@ namespace Microsoft.AspNet.Mvc.Razor.Directives
/// <param name="defaultModelType">The type name of the model used by default.</param>
public SetBaseTypeChunkMerger(string modelType)
{
_modelType = '<' + modelType + '>';
_modelType = "<" + modelType + ">";
}
/// <inheritdoc />

View File

@ -17,7 +17,7 @@ namespace Microsoft.AspNet.Mvc.Razor
[NotNull] string activateAttributeName)
: base(writer, context)
{
_activateAttribute = '[' + activateAttributeName + ']';
_activateAttribute = "[" + activateAttributeName + "]";
}
public List<InjectChunk> InjectChunks
@ -40,7 +40,7 @@ namespace Microsoft.AspNet.Mvc.Razor
var code = string.IsNullOrEmpty(chunk.MemberName) ?
chunk.TypeName :
chunk.TypeName + ' ' + chunk.MemberName;
chunk.TypeName + " " + chunk.MemberName;
var csharpVisitor = new CSharpCodeVisitor(Writer, Context);
csharpVisitor.CreateExpressionCodeMapping(code, chunk);
Writer.WriteLine("{ get; private set; }");

View File

@ -60,7 +60,7 @@ namespace Microsoft.AspNet.Mvc.Razor
_baseType = BaseType;
TagHelperDescriptorResolver = new TagHelperDescriptorResolver();
DefaultBaseClass = BaseType + '<' + DefaultModel + '>';
DefaultBaseClass = BaseType + "<" + DefaultModel + ">";
DefaultNamespace = "Asp";
// Enable instrumentation by default to allow precompiled views to work with BrowserLink.
EnableInstrumentation = true;

View File

@ -1422,7 +1422,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests
public override string ToString()
{
return Url + '?' + string.Join("&", Values.Select(kvp => kvp.Key + '=' + kvp.Value));
return Url + "?" + string.Join("&", Values.Select(kvp => kvp.Key + "=" + kvp.Value));
}
public static implicit operator string (LinkBuilder builder)