protected PropertyRepresentation(IOidStrategy oidStrategy, AbstractPropertyRepresentationStrategy strategy)
     : base(oidStrategy, strategy)
 {
     HasChoices = strategy.GetHasChoices();
     Links      = strategy.GetLinks();
     Extensions = strategy.GetExtensions();
 }
Ejemplo n.º 2
0
 protected InlinePropertyRepresentation(IOidStrategy oidStrategy, AbstractPropertyRepresentationStrategy strategy)
     : base(oidStrategy, strategy.GetFlags())
 {
     MemberType = MemberTypes.Property;
     Id         = strategy.GetId();
     Links      = strategy.GetLinks();
     Extensions = strategy.GetExtensions();
     SetHeader(strategy.GetTarget());
 }
        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));
        }