anchor.diff:          RoutedEventHandler onEvent :> _
       
       member __.ObserverBinding = observerBinding
  -
  -                
positive.code:             values.Clone()
          member x.ConvertBack(_, _, _, _) : obj [] = failwith "Not supported"
  
  [<MarkupExtensionReturnType(typeof<MethodInfo>)>]
  type FunctionExtension(name : String) = 
      inherit MarkupExtension()
      let name = name
      override this.ProvideValue(serviceProvider : IServiceProvider) =
          let resolver = ServiceProvider.XamlTypeResolver serviceProvider
          if obj.ReferenceEquals(resolver, null) then null
          else
              let m = System.Text.RegularExpressions.Regex.Match(name, @"(?<qn>\w+:\w+)\.(?<method>\w+)")
              if m.Success then
                  let t = resolver.Resolve(m.Groups.["qn"].Value)
                  let methodName = m.Groups.["method"].Value
                  t.GetMethod(methodName, BindingFlags.Static ||| BindingFlags.Public ||| BindingFlags.NonPublic) :>_
              else null
  
  [<MarkupExtensionReturnType(typeof<RoutedEventHandler>)>]
  type HandlerExtension(observerBinding : Binding, map : obj) as me = 
      inherit MarkupExtension()
  
      let getMapMethod (map:obj) =
          let verifyMapMethod (mi:MethodInfo) =
              let paramaters = mi.GetParameters()
              if not (paramaters.Length = 1) || not (typeof<EventArgs>.IsAssignableFrom(paramaters.[0].ParameterType)) then
                  DesignMode.failIfDesignModef "Invalid map method: %s first argument must be a subtype of System.EventArgs" (map.GetType().FullName)
              if mi.ReturnType = typeof<Void> then
                   DesignMode.failIfDesignModef "Invalid map method: %s cannot have returntype void" (map.GetType().FullName)
  
          let (|InvokeMethod|_|) (value : obj) = 
              if obj.ReferenceEquals(value, null) then None
              else 
                  let invokeMethod = value.GetType().GetMethod("Invoke")
                  if obj.ReferenceEquals(invokeMethod, null) then None
                  else Some(invokeMethod)
  
          let invoke (mi : MethodInfo) self arg =
              mi.Invoke(self, [|arg|])
  
          match map with
          | :? MethodInfo as mi -> 
              verifyMapMethod mi
  
negative.code:         observers.[index]
      
      let onEvent (sender : obj) (e : RoutedEventArgs) = 
          let mapped = map (e)
          let observer = getObserver (sender :?> FrameworkElement)
          Reflection.invoke observer "OnNext" mapped |> ignore
      
  