public RestSnapshot(IOidStrategy oidStrategy, ListContextFacade listContext, HttpRequestMessage req, RestControlFlags flags)
     : this(oidStrategy, req, true)
 {
     populator = () => {
         Representation = ListRepresentation.Create(oidStrategy, listContext, req, flags);
         SetHeaders();
     };
 }
Пример #2
0
 public RestSnapshot(IOidStrategy oidStrategy, ListContextFacade listContext, HttpRequestMessage req, RestControlFlags flags)
     : this(oidStrategy, req, true)
 {
     logger.DebugFormat("RestSnapshot:ServicesList");
     populator = () => {
         representation = ListRepresentation.Create(oidStrategy, listContext, req, flags);
         SetHeaders();
     };
 }
Пример #3
0
 protected ListRepresentation(IOidStrategy oidStrategy, ListContextFacade listContext, HttpRequestMessage req, RestControlFlags flags)
     : base(oidStrategy, flags)
 {
     Value       = listContext.List.Select(c => CreateObjectLink(oidStrategy, req, c)).ToArray();
     SelfRelType = new ListRelType(RelValues.Self, SegmentValues.Services, new UriMtHelper(oidStrategy, req, listContext.ElementType));
     SetLinks(req);
     SetExtensions();
     SetHeader(listContext.IsListOfServices);
 }
Пример #4
0
 public RestSnapshot(IOidStrategy oidStrategy, ParameterContextFacade parmContext, ListContextFacade listContext, HttpRequestMessage req, RestControlFlags flags)
     : this(oidStrategy, req, true)
 {
     logger.DebugFormat("RestSnapshot:parameterprompt");
     populator = () => {
         representation = PromptRepresentation.Create(oidStrategy, parmContext, listContext, req, flags);
         SetHeaders();
     };
 }
Пример #5
0
 public static ListRepresentation Create(IOidStrategy oidStrategy, ListContextFacade listContext, HttpRequestMessage req, RestControlFlags flags)
 {
     return(new ListRepresentation(oidStrategy, listContext, req, flags));
 }
Пример #6
0
 public static ListRepresentation Create(IOidStrategy oidStrategy, ListContextFacade listContext, HttpRequest req, RestControlFlags flags) => new ListRepresentation(oidStrategy, listContext, req, flags);
Пример #7
0
 private void SetChoices(ListContextFacade listContext, ParameterContextFacade paramContext, HttpRequestMessage req)
 {
     Choices = listContext.List.Select(c => RestUtils.GetChoiceValue(OidStrategy, req, c, paramContext.Parameter, Flags)).ToArray();
 }
Пример #8
0
        protected PromptRepresentation(IOidStrategy oidStrategy, ParameterContextFacade parmContext, ListContextFacade listContext, HttpRequestMessage req, RestControlFlags flags)
            : base(oidStrategy, flags)
        {
            SetScalars(parmContext.Id);
            SetChoices(listContext, parmContext, req);
            SelfRelType = new PromptRelType(RelValues.Self, new UriMtHelper(oidStrategy, req, parmContext));
            var           helper        = new UriMtHelper(oidStrategy, req, parmContext.Target);
            ObjectRelType parentRelType = parmContext.Target.Specification.IsService ? new ServiceRelType(RelValues.Up, helper) : new ObjectRelType(RelValues.Up, helper);

            SetLinks(req, listContext.ElementType, parentRelType);
            SetExtensions();
            SetHeader(listContext.IsListOfServices);
        }
Пример #9
0
 protected PromptRepresentation(IOidStrategy oidStrategy, PropertyContextFacade propertyContext, ListContextFacade listContext, HttpRequestMessage req, RestControlFlags flags)
     : base(oidStrategy, flags)
 {
     SetScalars(propertyContext.Property.Id);
     SetChoices(listContext, propertyContext, req);
     SelfRelType = new PromptRelType(RelValues.Self, new UriMtHelper(oidStrategy, req, propertyContext));
     SetLinks(req, listContext.ElementType, new ObjectRelType(RelValues.Up, new UriMtHelper(oidStrategy, req, propertyContext.Target)));
     SetExtensions();
     SetHeader(listContext.IsListOfServices);
 }
Пример #10
0
 public static Representation Create(IOidStrategy oidStrategy, ParameterContextFacade parmContext, ListContextFacade listContext, HttpRequestMessage req, RestControlFlags flags)
 {
     return(new PromptRepresentation(oidStrategy, parmContext, listContext, req, flags));
 }