[runtime] Fix corlib out of date error with disabled COM
[mono.git] / mcs / class / referencesource / System.Activities.Presentation / System.Activities.Presentation / System / Activities / Presentation / Base / Core / Internal / PropertyEditing / FromExpression / Framework / Data / EqualsConverter.cs
1 // -------------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation. All Rights Reserved.
3 // -------------------------------------------------------------------
4 //From \\authoring\Sparkle\Source\1.0.1083.0\Common\Source\Framework\Data
5 namespace System.Activities.Presentation.Internal.PropertyEditing.FromExpression.Framework.Data
6 {
7     using System;
8     using System.Globalization;
9     using System.Windows;
10     using System.Windows.Data;
11     using System.Activities.Presentation;
12
13     internal class EqualsConverter : DependencyObject, IValueConverter
14     {
15         private object defaultValue = false, matchValue = true;
16
17         // IValueConverter Members
18         public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
19         {
20             if (Object.Equals(value, parameter))
21             {
22                 return this.matchValue;
23             }
24             else
25             {
26                 return this.defaultValue;
27             }
28         }
29
30         public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
31         {
32             throw FxTrace.Exception.AsError(new InvalidOperationException());
33         }
34     }
35 }