public static InlinePropertyRepresentation Create(HttpRequestMessage req, PropertyContextSurface propertyContext, IList <OptionalProperty> optionals, RestControlFlags flags) { if (!RestUtils.IsBlobOrClob(propertyContext.Specification) && !RestUtils.IsAttachment(propertyContext.Specification)) { optionals.Add(new OptionalProperty(JsonPropertyNames.Value, GetPropertyValue(req, propertyContext.Property, propertyContext.Target, flags))); } RestUtils.AddChoices(req, propertyContext, optionals, flags); return(CreateWithOptionals <InlinePropertyRepresentation>(new object[] { new PropertyRepresentationStrategy(req, propertyContext, flags) }, optionals)); }
public static PropertyRepresentation Create(IOidStrategy oidStrategy, HttpRequest req, PropertyContextFacade propertyContext, IList <OptionalProperty> optionals, RestControlFlags flags) { var strategy = AbstractPropertyRepresentationStrategy.GetStrategy(false, oidStrategy, req, propertyContext, flags); if (!RestUtils.IsBlobOrClob(propertyContext.Specification) && !RestUtils.IsAttachment(propertyContext.Specification)) { optionals.Add(new OptionalProperty(JsonPropertyNames.Value, strategy.GetPropertyValue(oidStrategy, req, propertyContext.Property, propertyContext.Target, flags, false, strategy.UseDateOverDateTime()))); } RestUtils.AddChoices(oidStrategy, req, propertyContext, optionals, flags); return(CreateWithOptionals <PropertyRepresentation>(new object[] { oidStrategy, strategy }, optionals)); }