Browse Source

Remove unused copy of AssemblyQualifiedTypeName.cs

pull/297/head
Daniel Grunwald 12 years ago
parent
commit
db09a07341
  1. 1
      src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
  2. 73
      src/Main/Base/Project/Src/Services/RefactoringService/AssemblyQualifiedTypeName.cs

1
src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj

@ -589,7 +589,6 @@ @@ -589,7 +589,6 @@
<Compile Include="Src\Services\RefactoringService\ExtractInterfaceOptions.cs" />
<Compile Include="Src\Services\RefactoringService\FindReferenceService.cs" />
<Compile Include="Src\Services\RefactoringService\TypeGraphNode.cs" />
<Compile Include="Src\Services\RefactoringService\AssemblyQualifiedTypeName.cs" />
<Compile Include="Src\Services\Tasks\ErrorPainter.cs" />
<Compile Include="Src\Services\Tasks\TagComment.cs" />
<Compile Include="Src\Services\Tasks\Task.cs" />

73
src/Main/Base/Project/Src/Services/RefactoringService/AssemblyQualifiedTypeName.cs

@ -1,73 +0,0 @@ @@ -1,73 +0,0 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using ICSharpCode.Core;
using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.NRefactory.TypeSystem.Implementation;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Parser;
using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.SharpDevelop.Refactoring
{
public struct AssemblyQualifiedTypeName : IEquatable<AssemblyQualifiedTypeName>
{
public readonly string AssemblyName;
public readonly FullTypeName TypeName;
public AssemblyQualifiedTypeName(FullTypeName typeName, string assemblyName)
{
this.AssemblyName = assemblyName;
this.TypeName = typeName;
}
public AssemblyQualifiedTypeName(ITypeDefinition typeDefinition)
{
this.AssemblyName = typeDefinition.ParentAssembly.AssemblyName;
this.TypeName = typeDefinition.FullTypeName;
}
public override string ToString()
{
if (string.IsNullOrEmpty(AssemblyName))
return TypeName.ToString();
else
return TypeName.ToString() + ", " + AssemblyName;
}
public override bool Equals(object obj)
{
return (obj is AssemblyQualifiedTypeName) && Equals((AssemblyQualifiedTypeName)obj);
}
public bool Equals(AssemblyQualifiedTypeName other)
{
return this.AssemblyName == other.AssemblyName && this.TypeName == other.TypeName;
}
public override int GetHashCode()
{
int hashCode = 0;
unchecked {
if (AssemblyName != null)
hashCode += 1000000007 * AssemblyName.GetHashCode();
hashCode += TypeName.GetHashCode();
}
return hashCode;
}
public static bool operator ==(AssemblyQualifiedTypeName lhs, AssemblyQualifiedTypeName rhs)
{
return lhs.Equals(rhs);
}
public static bool operator !=(AssemblyQualifiedTypeName lhs, AssemblyQualifiedTypeName rhs)
{
return !lhs.Equals(rhs);
}
}
}
Loading…
Cancel
Save