public SetVersionResultContract GetSetVersion(string setId, string versionId)
        {
            SetVersionResultContract result = new SetVersionResultContract();

            LoaderResults setData = this.loadedSetData.Get();

            if (setData == null)
            {
                throw new NotFoundException("setData");
            }

            SetVersion setVersion = setData.FindSetVersion(setId, versionId);

            result.Set          = setVersion.Name;
            result.Version      = setVersion.Version;
            result.DetailLevels =
                setVersion.DetailLevels.Values.Select(
                    l =>
                    new LevelOfDetailContract
            {
                Name             = l.Name,
                SetSize          = new Vector3Contract(l.SetSize),
                ModelBounds      = new BoundingBoxContract(l.ModelBounds),
                WorldBounds      = new BoundingBoxContract(l.WorldBounds),
                TextureSetSize   = new Vector2Contract(l.TextureSetSize),
                WorldCubeScaling = new Vector3Contract(l.WorldToCubeRatio),
                VertexCount      = l.VertexCount
            }).ToArray();

            return(result);
        }
 public IHttpActionResult Get(string setid, string versionid)
 {
     try
     {
         SetVersionResultContract result = Dependency.Storage.GetSetVersion(setid, versionid);
         return(this.Ok(ResultWrapper.OkResult(result)));
     }
     catch (NotFoundException ex)
     {
         Trace.WriteLine(ex, "SetController::Get");
         return(this.NotFound());
     }
 }