Beispiel #1
0
        public ActionResult Image(string location, string id)
        {
            Response.Cache.SetOmitVaryStar(true);
            IContractFactory <IResourceAccess> builder = Actor.Public.GetNamedExport <IContractFactory <IResourceAccess> >(location);

            if (builder.IsNull())
            {
                return(Content("no resource"));
            }
            return(File(builder.Build().GetImage(id), "image/png"));
        }
Beispiel #2
0
        public ActionResult Script(string location, string id)
        {
            Response.Cache.SetOmitVaryStar(true);
            IContractFactory <IResourceAccess> builder = Actor.Public.GetNamedExport <IContractFactory <IResourceAccess> >(location);

            if (builder.IsNull())
            {
                return(Content("no resource"));
            }
            return(Content(builder.Build().GetScript(id), "text/javascript"));
        }