Пример #1
0
        public static SimpleSearchCondition CreateForControlType(Type testControlType, string frameworkId)
        {
            ControlType controlType = testControlType.IsCustomType()
                                          ? CustomControlTypeMapping.ControlType(testControlType)
                                          : ControlDictionary.Instance.GetControlType(testControlType, frameworkId);

            return(CreateForControlType(controlType));
        }
Пример #2
0
        public static SearchCondition CreateForControlType(Type testControlType, WindowsFramework framework)
        {
            if (testControlType.IsCustomType())
            {
                return(CreateForControlType(CustomControlTypeMapping.ControlType(testControlType, framework)));
            }
            var controlTypes = ControlDictionary.Instance.GetControlType(testControlType, framework.FrameworkId());

            if (controlTypes.Length == 1)
            {
                return(CreateForControlType(controlTypes[0]));
            }

            return(new OrSearchCondition(controlTypes.Select(CreateForControlType).ToArray()));
        }