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. // Both templates contain some text.
return left + '/' + right; return left + "/" + right;
} }
private static bool IsOverridePattern(string template) 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> /// <param name="modelType">The model type to be used to replace &lt;TModel&gt; tokens.</param>
public InjectChunkMerger([NotNull] string modelType) public InjectChunkMerger([NotNull] string modelType)
{ {
_modelType = '<' + modelType + '>'; _modelType = "<" + modelType + ">";
} }
/// <inheritdoc /> /// <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> /// <param name="defaultModelType">The type name of the model used by default.</param>
public SetBaseTypeChunkMerger(string modelType) public SetBaseTypeChunkMerger(string modelType)
{ {
_modelType = '<' + modelType + '>'; _modelType = "<" + modelType + ">";
} }
/// <inheritdoc /> /// <inheritdoc />

View File

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

View File

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

View File

@ -1422,7 +1422,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests
public override string ToString() 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) public static implicit operator string (LinkBuilder builder)