public static IEnumerable <IXamlMethod> GetMarkupExtensionProvideValueAlternatives( AstTransformationContext context, IXamlType type) { var sp = context.Configuration.TypeMappings.ServiceProvider; return(type.FindMethods(m => (m.Name == "ProvideValue" || m.Name == "ProvideTypedValue") && m.IsPublic && !m.IsStatic && (m.Parameters.Count == 0 || (m.Parameters.Count == 1 && m.Parameters[0].Equals(sp))) )); }