[System] Fix a few type members on WatchOS
[mono.git] / mcs / class / Microsoft.Build.Tasks / Microsoft.Build.Tasks / RemoveDuplicates.cs
index 199ea2c5f6d888faccf2c687f1d755856f2a9355..60540c3068a75c3eb711434314fcdade56d101f1 100644 (file)
@@ -25,7 +25,6 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-#if NET_2_0
 
 using System;
 using System.Collections.Generic;
@@ -47,12 +46,12 @@ namespace Microsoft.Build.Tasks {
                        if (inputs == null || inputs.Length == 0)
                                return true;
 
-                       Dictionary <ITaskItem, object> items = new Dictionary <ITaskItem, object> ();
+                       Dictionary <string, ITaskItem> items = new Dictionary <string, ITaskItem> ();
                        List <ITaskItem> list = new List <ITaskItem> ();
 
                        foreach (ITaskItem item in inputs) {
-                               if (!items.ContainsKey (item)) {
-                                       items.Add (item, null);
+                               if (!items.ContainsKey (item.ItemSpec)) {
+                                       items.Add (item.ItemSpec, item);
                                        list.Add (item);
                                }
                        }
@@ -62,6 +61,7 @@ namespace Microsoft.Build.Tasks {
                        return true;
                }
                
+               [Output]
                public ITaskItem [] Filtered {
                        get { return filtered; }
                        set { filtered = value; }
@@ -74,4 +74,3 @@ namespace Microsoft.Build.Tasks {
        }
 }
 
-#endif