예제 #1
0
        IEnumerable <Reflection.IProperty> GenerateProps()
        {
            var t = UnoDataType;

            if (_ctor != null)
            {
                foreach (var p in _ctor.Parameters)
                {
                    yield return(new ConstructorArgumentReflector(_ctor, p, _c));
                }
            }

            while (t != null)
            {
                foreach (var p in t.Properties.Where(IsSutiableProperty))
                {
                    yield return(new PropertyReflector(p, _c));
                }

                t = t.Base;
            }

            foreach (var p in _c.AttachedProperties.Where(x => UnoDataType.IsCompatibleWith(x.OwnerType)))
            {
                yield return(new AttachedPropertyReflector(p, _c));
            }
        }
예제 #2
0
        IEnumerable <Reflection.IEvent> GenerateEvents()
        {
            var t = UnoDataType;

            while (t != null)
            {
                foreach (var e in t.Events)
                {
                    yield return(new RegularEventReflector(e));
                }



                t = t.Base;
            }

            foreach (var e in _c.AttachedEvents.Where(x => UnoDataType.IsCompatibleWith(x.OwnerType)))
            {
                yield return(new AttachedEventReflector(e, _c));
            }
        }
예제 #3
0
        public bool Implements(IDataType baseType)
        {
            var t = _c.TryGetUnoTypeByName(baseType.FullName);

            return(t != null && UnoDataType.IsCompatibleWith(t));
        }