Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUngureanu Marius <teromario@yahoo.com>2014-04-05 20:24:23 +0400
committerUngureanu Marius <teromario@yahoo.com>2014-04-05 20:24:23 +0400
commit7845576ade414f91934da0a47eed0c5f31178dad (patch)
tree8e478fa28231a929b0f0c382a42a296acd5db1f1 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem
parent05903e6c3764ad9b990de21d7a72103107b48b54 (diff)
[API] More removal.
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs66
1 files changed, 3 insertions, 63 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs
index 8b833c097c..f9c9158804 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs
@@ -52,27 +52,6 @@ namespace MonoDevelop.Ide.TypeSystem
{
public static class TypeSystemServiceExt
{
- [Obsolete ("Don't use this method the caller should always have the project and get the type system from that instead the other way around.")]
- public static Project GetProject (this IProjectContent content)
- {
- return TypeSystemService.GetProject (content.Location);
- }
-
- [Obsolete ("Use TryGetSourceProject.")]
- public static Project GetSourceProject (this ITypeDefinition type)
- {
- var location = type.Compilation.MainAssembly.UnresolvedAssembly.Location;
- if (string.IsNullOrEmpty (location))
- return null;
- return TypeSystemService.GetProject (location);
- }
-
- [Obsolete ("Use TryGetSourceProject.")]
- public static Project GetSourceProject (this IType type)
- {
- return type.GetDefinition ().GetSourceProject ();
- }
-
/// <summary>
/// Tries to the get source project for a given type definition. This operation may fall if it was called on an outdated
/// compilation unit or the correspondening project was unloaded.
@@ -119,13 +98,9 @@ namespace MonoDevelop.Ide.TypeSystem
internal static Project GetProjectWhereTypeIsDefined (this IType type)
{
- return type.GetDefinition ().GetSourceProject ();
- }
-
- [Obsolete ("Don't use this method the caller should always have the project and get the type system from that instead the other way around.")]
- public static IProjectContent GetProjectContent (this IType type)
- {
- return TypeSystemService.GetProjectContext (type.GetSourceProject ());
+ Project project;
+ TryGetSourceProject (type, out project);
+ return project;
}
public static TextLocation GetLocation (this IType type)
@@ -167,41 +142,6 @@ namespace MonoDevelop.Ide.TypeSystem
var resolvedType = def.Resolve (ctx);
return resolvedType;
}
-
- [Obsolete ("Do not use this method. Use type references to resolve types. Type references from full reflection names can be got from ReflectionHelper.ParseReflectionName.")]
- public static ITypeDefinition LookupType (this ICompilation compilation, string ns, string name, int typeParameterCount = -1)
- {
- var tc = Math.Max (typeParameterCount, 0);
- ITypeDefinition result;
- foreach (var refAsm in compilation.Assemblies) {
- result = refAsm.GetTypeDefinition (ns, name, tc);
- if (result != null)
- return result;
- }
- if (typeParameterCount < 0) {
- for (int i = 1; i < 50; i++) {
- result = LookupType (compilation, ns, name, i);
- if (result != null)
- return result;
- }
- }
- return null;
- }
-
- [Obsolete ("Do not use this method. Use type references to resolve types. Type references from full reflection names can be got from ReflectionHelper.ParseReflectionName.")]
- public static ITypeDefinition LookupType (this ICompilation compilation, string fullName, int typeParameterCount = -1)
- {
- int idx = fullName.LastIndexOf ('.');
- string ns, name;
- if (idx > 0) {
- ns = fullName.Substring (0, idx);
- name = fullName.Substring (idx + 1);
- } else {
- ns = "";
- name = fullName;
- }
- return compilation.LookupType (ns, name, typeParameterCount);
- }
}
/// <summary>