Exemplo n.º 1
0
        public ContentItem(BaseContent content, List <string> significantRouteKeys, RequestDataSpecification rds)
        {
            this.Type       = content.GetType().FullName;
            this.Path       = rds.Path;
            this.Controller = rds.Controller;
            this.Action     = rds.Action;
            List <string> subindexes = rds.GetRouteValues(significantRouteKeys);

            SetSubindexes(subindexes);

            if (content == null)
            {
                this.Content = "{}";
            }
            else
            {
                this.Content = JsonConvert.SerializeObject(content);
            }
        }
Exemplo n.º 2
0
 public ContentAddress(RequestDataSpecification rds, List <string> significantRouteKeys)
 {
     Controller = rds.Controller;
     Action     = rds.Action;
     Subindexes = rds.GetRouteValues(significantRouteKeys);
 }