Пример #1
0
        public static IEnumerable <IXamlIlMethod> GetMarkupExtensionProvideValueAlternatives(
            XamlIlAstTransformationContext context,
            IXamlIlType 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)))
                                    ));
        }