Example #1
0
      internal void Load(string baseUri, ProxyAuthRequestResult par)
      {
          _svcBldr.Token = par.Token;
          EncryptedToken = par.Token;
          Options        = par.Arguments;

          var svc = _svcBldr.BulkDataV2();
          var sr  = svc.GetBulkGuestData();

          ExceptionsML.Check(sr.Error);
          var result = sr.Result;

          BulkData = JsonConvert.SerializeObject(sr);
          if (result.LicenseTokens != null)
          {
              Licenses = new List <TokenKey>((result.LicenseTokens));
          }

          User        = result.CurrentUser;
          CurrentUser = JsonConvert.SerializeObject(new { Name = result.CurrentUser.Username, Id = result.CurrentUser.Id });
          CompanyName = result.CompanyName;

          HttpRuntimeSection httpRuntimeSection = ConfigurationManager.GetSection("system.web/httpRuntime") as HttpRuntimeSection;

          MaxRequestLength  = httpRuntimeSection.MaxRequestLength;
          IsReadOnlyUser    = result.CurrentUser.ReadOnlyUser;
          Version           = Functions.GetVersion();
          SystemPreferences = JsonConvert.SerializeObject(result.CompanySettings);
          var views = GetCachedViews(baseUri);

          CommonTemplates = JsonConvert.SerializeObject(views);
      }