public static object GetChoiceValue(INakedObjectSurface item, ChoiceRelType relType, RestControlFlags flags) { string title = SafeGetTitle(item); object value = ObjectToPredefinedType(item.Object); return(item.Specification.IsParseable() ? value : LinkRepresentation.Create(relType, flags, new OptionalProperty(JsonPropertyNames.Title, title))); }
public static object GetChoiceValue(INakedObjectSurface item, ChoiceRelType relType, RestControlFlags flags) { string title = SafeGetTitle(item); object value = ObjectToPredefinedType(item.Object); return item.Specification.IsParseable() ? value : LinkRepresentation.Create(relType, flags, new OptionalProperty(JsonPropertyNames.Title, title)); }
public static object GetChoiceValue(IOidStrategy oidStrategy, IObjectFacade item, ChoiceRelType relType, RestControlFlags flags) { string title = SafeGetTitle(item); object value = ObjectToPredefinedType(item.GetDomainObject()); return item.Specification.IsParseable ? value : LinkRepresentation.Create(oidStrategy, relType, flags, new OptionalProperty(JsonPropertyNames.Title, title)); }
public static object GetChoiceValue(IOidStrategy oidStrategy, IObjectFacade item, ChoiceRelType relType, RestControlFlags flags) { string title = SafeGetTitle(item); object value = ObjectToPredefinedType(item.GetDomainObject()); return(item.Specification.IsParseable ? value : LinkRepresentation.Create(oidStrategy, relType, flags, new OptionalProperty(JsonPropertyNames.Title, title))); }