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)); } }
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)); } }
public bool Implements(IDataType baseType) { var t = _c.TryGetUnoTypeByName(baseType.FullName); return(t != null && UnoDataType.IsCompatibleWith(t)); }