public ActionResult Possible()
        {
            var model = new PossibleViewModel();

            PopulateInputFormats(model);
            PopulateOutputFormats(model);

            model.ResultHandlerUrl = ExamplesConfiguration.GetDynamicDownloadUrl(
                ResultHandlerName,
                new NameValueCollection
            {
                { "version", DateTime.UtcNow.Ticks.ToString() }
            });

            return(View(model));
        }
 private void PopulateOutputFormats(PossibleViewModel model)
 {
     foreach (var formatInfo in DocumentFormatInfo.Enumerate(DocumentFormatSupport.Save))
     {
         List <SelectListItem> groupData;
         if (!model.OutputFormats.TryGetValue(formatInfo.Group.Description, out groupData))
         {
             groupData = new List <SelectListItem>();
             model.OutputFormats.Add(formatInfo.Group.Description, groupData);
         }
         groupData.Add(new SelectListItem
         {
             Text  = formatInfo.Description,
             Value = formatInfo.Value.ToString()
         });
         model.OutputFormatCount++;
     }
 }