[runtime] Fix corlib out of date error with disabled COM
[mono.git] / mcs / class / referencesource / System.Activities.Presentation / System.Activities.Presentation / System / Activities / Presentation / FreeFormEditing / ConnectorIdentityConverter.cs
1 //------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation.  All rights reserved.
3 //------------------------------------------------------------
4
5 namespace System.Activities.Presentation.FreeFormEditing
6 {
7     using System.Windows.Data;
8     using System.Runtime;
9     using System.Windows.Media;
10     using System.Globalization;
11
12     class ConnectorIdentityConverter : IMultiValueConverter
13     {
14         public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
15         {
16             Fx.Assert(values[0] is Guid, "The first value should be a Guid");
17             Fx.Assert(values[1] is PointCollection, "The second value should be a PointCollection");
18             Guid identityGuid = (Guid)values[0];
19             PointCollection points = (PointCollection)values[1];
20             return identityGuid + "," + points.ToString();
21         }
22
23         public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
24         {
25             throw FxTrace.Exception.AsError(new NotSupportedException());
26         }
27     }
28 }