: context.Namer.FormatName(obj.GetType().Name); // Otherwise base it on the type name protected virtual IEnumerable <IOclElement> GetElements(object obj, IEnumerable <PropertyInfo> properties, OclConversionContext context) { var elements = from p in properties from element in context.ToElements(p, p.GetValue(obj)) orderby element is OclBlock, element.Name select element; return(elements); }
public IEnumerable <IOclElement> ToElements(OclConversionContext context, PropertyInfo?propertyInfo, object value) { var items = (IEnumerable)value; foreach (var item in items) { if (item != null) { foreach (var element in context.ToElements(propertyInfo, item)) { yield return(element); } } } }