Fix build.

Removed Equals from SetModelTypeCodeGenerator and removed accidentally
committed file.  The Equals method caused a warning without a corresponding
GetHashCode().
This commit is contained in:
N. Taylor Mullen 2014-02-10 12:23:36 -08:00
parent 226d632794
commit 4cd2cce360
2 changed files with 0 additions and 40 deletions

View File

@ -1,32 +0,0 @@
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
using System.CodeDom;
using Microsoft.AspNet.Razor;
using Microsoft.AspNet.Razor.Generator;
namespace Microsoft.AspNet.Mvc.Razor
{
internal class MvcRazorCodeGenerator : CSharpRazorCodeGenerator
{
private const string DefaultModelTypeName = "dynamic";
public MvcRazorCodeGenerator(string className, string rootNamespaceName, string sourceFileName, RazorEngineHost host)
: base(className, rootNamespaceName, sourceFileName, host)
{
var mvcHost = host as MvcRazorHost;
if (mvcHost != null)
{
// set the default model type to "dynamic" (Dev10 bug 935656)
// don't set it for "special" pages (such as "_viewStart.cshtml")
SetBaseType(DefaultModelTypeName);
}
}
private void SetBaseType(string modelTypeName)
{
var baseType = new CodeTypeReference(Context.Host.DefaultBaseClass + "<" + modelTypeName + ">");
Context.GeneratedClass.BaseTypes.Clear();
Context.GeneratedClass.BaseTypes.Add(baseType);
}
}
}

View File

@ -23,14 +23,6 @@ namespace Microsoft.AspNet.Mvc.Razor
baseType);
}
public override bool Equals(object obj)
{
SetModelTypeCodeGenerator other = obj as SetModelTypeCodeGenerator;
return other != null &&
base.Equals(obj) &&
String.Equals(_genericTypeFormat, other._genericTypeFormat, StringComparison.Ordinal);
}
public override string ToString()
{
return "Model:" + BaseType;