コード例 #1
0
        private MethodInfo ResolveTypeIdMethod(ITypeId typeId, string methodName)
        {
            IType type = this.TypeResolver.ResolveType(typeId);

            if (type == null || this.TypeResolver.PlatformMetadata.IsNullType((ITypeId)type))
            {
                return((MethodInfo)null);
            }
            MethodInfo method = PlatformTypeHelper.GetMethod(type.RuntimeType, methodName);
            int        num    = method == (MethodInfo)null ? true : false;

            return(method);
        }
コード例 #2
0
        private static IList GetVisualStateGroups(object hostElement, ITypeResolver typeResolver)
        {
            IType type1 = typeResolver.ResolveType(ProjectNeutralTypes.VisualStateManager);

            typeResolver.ResolveType(ProjectNeutralTypes.VisualStateGroup);
            IType type2 = typeResolver.GetType(hostElement.GetType());

            if (!PlatformTypes.FrameworkElement.IsAssignableFrom((ITypeId)type2))
            {
                return((IList) new List <object>());
            }
            return(PlatformTypeHelper.GetMethod(type1.RuntimeType, "GetVisualStateGroups").Invoke(null, new object[1]
            {
                hostElement
            }) as IList);
        }