private object Logic_CreateFromValue(ObjectWriterContext ctx, XamlValueConverter<TypeConverter> typeConverter, object value, XamlMember property, string targetName, IAddLineInfo lineInfo)
 {
     object obj3;
     try
     {
         obj3 = this.Runtime.CreateFromValue(ctx.ServiceProviderContext, typeConverter, value, property);
     }
     catch (Exception exception)
     {
         if (CriticalExceptions.IsCriticalException(exception))
         {
             throw;
         }
         string message = System.Xaml.SR.Get("TypeConverterFailed", new object[] { targetName, value });
         throw lineInfo.WithLineInfo(new XamlObjectWriterException(message, exception));
     }
     return obj3;
 }
 private object GetKeyFromInstance(object instance, XamlType instanceType, IAddLineInfo lineInfo)
 {
     XamlMember aliasedProperty = instanceType.GetAliasedProperty(XamlLanguage.Key);
     if ((aliasedProperty == null) || (instance == null))
     {
         throw lineInfo.WithLineInfo(new XamlObjectWriterException(System.Xaml.SR.Get("MissingKey", new object[] { instanceType.Name })));
     }
     return this.Runtime.GetValue(instance, aliasedProperty);
 }