From 7a74150303124e514b7ac4f478f1c709211a923b Mon Sep 17 00:00:00 2001 From: Matt Ward Date: Sat, 26 Nov 2005 15:53:08 +0000 Subject: [PATCH] Fixed SD2-588. Type resolution service no longer returns types from the Microsoft.VSDesigner assembly. This stops the forms designer from using Microsoft's data adapter designers. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@804 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Services/TypeResolutionService.cs | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Services/TypeResolutionService.cs b/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Services/TypeResolutionService.cs index 669b840ef0..7963cc9a92 100644 --- a/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Services/TypeResolutionService.cs +++ b/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Services/TypeResolutionService.cs @@ -12,6 +12,7 @@ using System.Collections.Specialized; using System.Drawing; using System.ComponentModel; using System.ComponentModel.Design; +using ICSharpCode.Core; namespace ICSharpCode.FormDesigner.Services { @@ -51,6 +52,9 @@ namespace ICSharpCode.FormDesigner.Services if (name == null || name.Length == 0) { return null; } + if (IgnoreType(name)) { + return null; + } try { Assembly lastAssembly = null; foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) { @@ -97,5 +101,23 @@ namespace ICSharpCode.FormDesigner.Services { ICSharpCode.Core.LoggingService.Warn("TODO: Add Assembly reference : " + name); } + + /// + /// HACK - Ignore any requests for types from the Microsoft.VSDesigner + /// assembly. There are smart tag problems if data adapter + /// designers are used from this assembly. + /// + bool IgnoreType(string name) + { + int idx = name.IndexOf(","); + if (idx > 0) { + string[] splitName = name.Split(','); + string assemblyName = splitName[1].Substring(1); + if (assemblyName == "Microsoft.VSDesigner") { + return true; + } + } + return false; + } } }