Browse Source

Renamed MetaData class to MetaDataImport to avoid name collision with the namespace.

Removed Util.Lists.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2890 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 18 years ago
parent
commit
bd4f6b3709
  1. 3
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Debugger.Core.csproj
  2. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugType.cs
  3. 6
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Modules/Module.cs
  4. 33
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Util/Lists.cs
  5. 6
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/MetaData/MetaDataImport.cs

3
src/AddIns/Misc/Debugger/Debugger.Core/Project/Debugger.Core.csproj

@ -231,7 +231,6 @@
<Compile Include="Src\Threads\Thread.cs" /> <Compile Include="Src\Threads\Thread.cs" />
<Compile Include="Src\Threads\ThreadEventArgs.cs" /> <Compile Include="Src\Threads\ThreadEventArgs.cs" />
<Compile Include="Src\Util\HighPrecisionTimer.cs" /> <Compile Include="Src\Util\HighPrecisionTimer.cs" />
<Compile Include="Src\Util\Lists.cs" />
<Compile Include="Src\Values\ArrayDimension.cs" /> <Compile Include="Src\Values\ArrayDimension.cs" />
<Compile Include="Src\Values\ArrayDimensions.cs" /> <Compile Include="Src\Values\ArrayDimensions.cs" />
<Compile Include="Src\Values\Value.Array.cs" /> <Compile Include="Src\Values\Value.Array.cs" />
@ -371,7 +370,7 @@
<Compile Include="Src\Wrappers\CorSym\SequencePoint.cs" /> <Compile Include="Src\Wrappers\CorSym\SequencePoint.cs" />
<Compile Include="Src\Wrappers\ICorDebugManagedCallbacks.cs" /> <Compile Include="Src\Wrappers\ICorDebugManagedCallbacks.cs" />
<Compile Include="Src\Wrappers\MetaData\FieldProps.cs" /> <Compile Include="Src\Wrappers\MetaData\FieldProps.cs" />
<Compile Include="Src\Wrappers\MetaData\MetaData.cs" /> <Compile Include="Src\Wrappers\MetaData\MetaDataImport.cs" />
<Compile Include="Src\Wrappers\MetaData\MethodProps.cs" /> <Compile Include="Src\Wrappers\MetaData\MethodProps.cs" />
<Compile Include="Src\Wrappers\MetaData\ParamProps.cs" /> <Compile Include="Src\Wrappers\MetaData\ParamProps.cs" />
<Compile Include="Src\Wrappers\MetaData\TypeDefProps.cs" /> <Compile Include="Src\Wrappers\MetaData\TypeDefProps.cs" />

2
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugType.cs

@ -251,7 +251,7 @@ namespace Debugger.MetaData
static internal DebugType Create(Process process, ICorDebugClass corClass, params ICorDebugType[] typeArguments) static internal DebugType Create(Process process, ICorDebugClass corClass, params ICorDebugType[] typeArguments)
{ {
Debugger.Wrappers.MetaData.MetaData metaData = process.GetModule(corClass.Module).MetaData; MetaDataImport metaData = process.GetModule(corClass.Module).MetaData;
bool isValueType = false; bool isValueType = false;
uint superClassToken = metaData.GetTypeDefProps(corClass.Token).SuperClassToken; uint superClassToken = metaData.GetTypeDefProps(corClass.Token).SuperClassToken;

6
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Modules/Module.cs

@ -24,7 +24,7 @@ namespace Debugger
int orderOfLoading = 0; int orderOfLoading = 0;
ICorDebugModule corModule; ICorDebugModule corModule;
ISymUnmanagedReader symReader; ISymUnmanagedReader symReader;
Debugger.Wrappers.MetaData.MetaData metaData; MetaDataImport metaData;
[Debugger.Tests.Ignore] [Debugger.Tests.Ignore]
public Process Process { public Process Process {
@ -33,7 +33,7 @@ namespace Debugger
} }
} }
internal Debugger.Wrappers.MetaData.MetaData MetaData { internal MetaDataImport MetaData {
get { get {
return metaData; return metaData;
} }
@ -127,7 +127,7 @@ namespace Debugger
corModule = pModule; corModule = pModule;
metaData = new Debugger.Wrappers.MetaData.MetaData(pModule); metaData = new MetaDataImport(pModule);
fullPath = pModule.Name; fullPath = pModule.Name;

33
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Util/Lists.cs

@ -1,33 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
namespace Debugger.Util
{
public class Lists
{
public static List<T> MergeLists<T>(T a, IEnumerable<T> b)
{
return MergeLists(new T[] {a}, b);
}
public static List<T> MergeLists<T>(IEnumerable<T> a, T b)
{
return MergeLists(a, new T[] {b});
}
public static List<T> MergeLists<T>(IEnumerable<T> a, IEnumerable<T> b)
{
List<T> newList = new List<T>();
if (a != null) newList.AddRange(a);
if (b != null) newList.AddRange(b);
return newList;
}
}
}

6
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/MetaData/MetaData.cs → src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/MetaData/MetaDataImport.cs

@ -18,11 +18,11 @@ namespace Debugger.Wrappers.MetaData
/// <summary> /// <summary>
/// Wrapper for the unmanaged metadata API /// Wrapper for the unmanaged metadata API
/// </summary> /// </summary>
public class MetaData: IDisposable public class MetaDataImport: IDisposable
{ {
IMetaDataImport metaData; IMetaDataImport metaData;
public MetaData(ICorDebugModule pModule) public MetaDataImport(ICorDebugModule pModule)
{ {
Guid guid = new Guid("{ 0x7dac8207, 0xd3ae, 0x4c75, { 0x9b, 0x67, 0x92, 0x80, 0x1a, 0x49, 0x7d, 0x44 } }"); Guid guid = new Guid("{ 0x7dac8207, 0xd3ae, 0x4c75, { 0x9b, 0x67, 0x92, 0x80, 0x1a, 0x49, 0x7d, 0x44 } }");
metaData = (IMetaDataImport)pModule.GetMetaDataInterface(ref guid); metaData = (IMetaDataImport)pModule.GetMetaDataInterface(ref guid);
@ -39,7 +39,7 @@ namespace Debugger.Wrappers.MetaData
} }
} }
~MetaData() ~MetaDataImport()
{ {
Dispose(); Dispose();
} }
Loading…
Cancel
Save