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:
authorMike Krüger <mkrueger@xamarin.com>2011-06-23 21:25:30 +0400
committerMike Krüger <mkrueger@xamarin.com>2011-06-23 21:25:30 +0400
commitd835de27918613447a8c82873dc2021edd8aa60c (patch)
treeeed136b285d5693a619fc35efcd4627ed297d642 /main/src/addins/AspNet
parentd646818ec3f357f6400eaa52715abb0536b18638 (diff)
convertey check type to type system.
Diffstat (limited to 'main/src/addins/AspNet')
-rw-r--r--main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/AspProjectDom.cs29
1 files changed, 16 insertions, 13 deletions
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/AspProjectDom.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/AspProjectDom.cs
index fd16f32a46..09e5815d3d 100644
--- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/AspProjectDom.cs
+++ b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/AspProjectDom.cs
@@ -27,6 +27,8 @@ using System;
using System.Collections.Generic;
using System.Linq;
using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.TypeSystem.Implementation;
+
namespace MonoDevelop.AspNet.Gui
{
@@ -45,22 +47,23 @@ namespace MonoDevelop.AspNet.Gui
this.info = info;
}
- ITypeDefinition constructedType = null;
+ CompoundTypeDefinition constructedType = null;
ITypeDefinition CheckType (ITypeDefinition type)
{
-// TODO: Type system conversion.
-// if (type == null)
-// return null;
-// var cu =info.ParsedDocument.CompilationUnit;
-// var firstType = cu.Types.FirstOrDefault ();
-// if (type.IsPartial && firstType != null && firstType.FullName == type.FullName) {
-// if (constructedType != null)
-// return constructedType;
-// constructedType = CompoundType.Merge (firstType, type);
-// constructedType = CompoundType.Merge (constructedType, info.CodeBesideClass);
+ if (type == null)
+ return null;
+ var cu =info.ParsedDocument.CompilationUnit;
+ var firstType = cu.Types.FirstOrDefault ();
+ if (type.IsPartial && firstType != null && firstType.FullName == type.FullName) {
+ if (constructedType != null)
+ return constructedType;
+ constructedType = new CompoundTypeDefinition ();
+ constructedType.AddPart (firstType);
+ constructedType.AddPart (type);
+ constructedType.AddPart (info.CodeBesideClass);
// constructedType.GetProjectContent () = this;
-// return constructedType;
-// }
+ return constructedType;
+ }
return type;
}