public ActionRepresentationStrategy(IOidStrategy oidStrategy, HttpRequestMessage req, ActionContextFacade actionContext, RestControlFlags flags) : base(oidStrategy, flags) { this.req = req; this.actionContext = actionContext; self = new MemberRelType(RelValues.Self, new UriMtHelper(oidStrategy, req, actionContext)); parameterList = GetParameterList(); }
protected MemberRepresentationStrategy(IOidStrategy oidStrategy, HttpRequestMessage req, PropertyContextFacade propertyContext, RestControlFlags flags) : base(oidStrategy ,flags) { this.req = req; this.propertyContext = propertyContext; objectUri = new UriMtHelper(oidStrategy ,req, propertyContext); self = new MemberRelType(RelValues.Self, new UriMtHelper(oidStrategy , req, propertyContext)); }
private void SetLinks(HttpRequestMessage req, INakedObjectSpecificationSurface spec, RelType parentRelType) { var tempLinks = new List<LinkRepresentation> { LinkRepresentation.Create(parentRelType, Flags), LinkRepresentation.Create(SelfRelType, Flags) }; if (Flags.FormalDomainModel) { tempLinks.Add(LinkRepresentation.Create(new DomainTypeRelType(RelValues.ElementType, new UriMtHelper(req, spec)), Flags)); } Links = tempLinks.ToArray(); }
private void SetLinks(HttpRequestMessage req, ITypeFacade spec, RelType parentRelType) { var tempLinks = new List<LinkRepresentation> { LinkRepresentation.Create(OidStrategy ,parentRelType, Flags), LinkRepresentation.Create(OidStrategy,SelfRelType, Flags) }; if (Flags.FormalDomainModel) { tempLinks.Add(LinkRepresentation.Create(OidStrategy ,new DomainTypeRelType(RelValues.ElementType, new UriMtHelper(OidStrategy, req, spec)), Flags)); } Links = tempLinks.ToArray(); }
private void SetLinks(HttpRequestMessage req, PropertyContextSurface propertyContext, RelType parentRelType) { var tempLinks = new List<LinkRepresentation> { LinkRepresentation.Create(parentRelType, Flags), LinkRepresentation.Create(SelfRelType, Flags) }; if (Flags.FormalDomainModel) { tempLinks.Add(LinkRepresentation.Create(new DomainTypeRelType(RelValues.ReturnType, new UriMtHelper(req, propertyContext.Property)), Flags)); tempLinks.Add(LinkRepresentation.Create(new DomainTypeRelType(RelValues.ElementType, new UriMtHelper(req, propertyContext.Property.Specification)), Flags)); } Links = tempLinks.ToArray(); }
public static LinkRepresentation Create(RelType relType, RestControlFlags flags, params OptionalProperty[] properties) { return properties.Any() ? CreateWithOptionals<LinkRepresentation>(new object[] {relType, flags}, properties) : new LinkRepresentation(relType, flags); }
private void SetScalars(RelType relType) { Rel = relType.Name; Method = relType.Method.ToString().ToUpper(); Type = relType.GetMediaType(Flags).ToString(); }
protected LinkRepresentation(RelType relType, RestControlFlags flags) : base(relType, flags) { SetScalars(relType); }
public static RefValueRepresentation Create(RelType relType, RestControlFlags flags) { return new RefValueRepresentation(relType, flags); }
protected RefValueRepresentation(RelType relType, RestControlFlags flags) : base(flags) { Href = relType.GetUri().AbsoluteUri; }
protected LinkRepresentation(IOidStrategy oidStrategy, RelType relType, RestControlFlags flags) : base(oidStrategy ,relType, flags) { SetScalars(relType); }