コード例 #1
0
 protected PromptRepresentation(PropertyContextSurface propertyContext, ListContextSurface listContext, HttpRequestMessage req, RestControlFlags flags)
     : base(flags) {
     SetScalars(propertyContext.Property.Id);
     SetChoices(listContext, propertyContext, req);
     SelfRelType = new PromptRelType(RelValues.Self, new UriMtHelper(req, propertyContext));
     SetLinks(req, listContext.ElementType, new ObjectRelType(RelValues.Up, new UriMtHelper(req, propertyContext.Target)));
     SetExtensions();
     SetHeader(listContext.IsListOfServices);
 }
コード例 #2
0
 protected PromptRepresentation(ParameterContextSurface parmContext, ListContextSurface listContext, HttpRequestMessage req, RestControlFlags flags)
     : base(flags) {
     SetScalars(parmContext.Id);
     SetChoices(listContext, parmContext, req);
     SelfRelType = new PromptRelType(RelValues.Self, new UriMtHelper(req, parmContext));
     var helper = new UriMtHelper(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);
 }