public UriMtHelper(IOidStrategy oidStrategy, HttpRequestMessage req, TypeActionInvokeContext context) : this(oidStrategy, req) { typeAction = context.Id; cachedId = ""; CachedType = oidStrategy.GetLinkDomainTypeBySpecification(context.ThisSpecification); }
public RestSnapshot(IOidStrategy oidStrategy, TypeActionInvokeContext typeActionInvokeContext, HttpRequestMessage req, RestControlFlags flags) : this(oidStrategy, req, true) { populator = () => { Representation = TypeActionInvokeRepresentation.Create(oidStrategy, req, typeActionInvokeContext, flags); SetHeaders(); }; }
protected TypeActionInvokeRepresentation(IOidStrategy oidStrategy, HttpRequestMessage req, TypeActionInvokeContext context, RestControlFlags flags) : base(oidStrategy, flags) { SelfRelType = new TypeActionInvokeRelType(RelValues.Self, new UriMtHelper(oidStrategy, req, context)); SetScalars(context); SetLinks(req, context); SetExtensions(); SetHeader(); }
private void SetLinks(HttpRequestMessage req, TypeActionInvokeContext context) { string uri = new DomainTypeRelType(new UriMtHelper(OidStrategy, req, context.OtherSpecification)).GetUri().AbsoluteUri; var tempLinks = new List<LinkRepresentation> { LinkRepresentation.Create(OidStrategy, SelfRelType, Flags, new OptionalProperty(JsonPropertyNames.Arguments, MapRepresentation.Create(new OptionalProperty(context.ParameterId, MapRepresentation.Create(new OptionalProperty(JsonPropertyNames.Href, uri)))))) }; Links = tempLinks.ToArray(); }
public static TypeActionInvokeRepresentation Create(IOidStrategy oidStrategy, HttpRequestMessage req, TypeActionInvokeContext context, RestControlFlags flags) { return new TypeActionInvokeRepresentation(oidStrategy, req, context, flags); }
private void SetScalars(TypeActionInvokeContext context) { Id = context.Id; Value = context.Value; }