public static async Task Set(dynamic args)
 {
     AsyncLock.Releaser releaser = await DownloadsService.AsyncLock.LockAsync();
     try
     {
         JToken jTokens = (JToken)args.downloads;
         RealmDownloadsDescription realmDownloadsDescription = new RealmDownloadsDescription()
         {
             Downloads = jTokens.ToObject<RealmDownloadItem[]>()
         };
         AccountSettings accountSetting = await JsApiService.Client.Invoke<AccountSettings>("riot.accounts.get", false);
         AccountConfig[] accounts = accountSetting.Accounts;
         realmDownloadsDescription.Downloads = (
             from x in realmDownloadsDescription.Downloads
             where accounts.Any<AccountConfig>((AccountConfig account) => string.Equals(account.RealmId, x.RealmId, StringComparison.OrdinalIgnoreCase))
             select x).ToArray<RealmDownloadItem>();
         LittleClient client = JsApiService.Client;
         object[] objArray = new object[] { "download-realms", realmDownloadsDescription };
         await client.Invoke<object>("storage.set", objArray);
         JsApiService.Client.Purge<RealmDownloadsDescription>("storage.get", "download-realms");
     }
     finally
     {
         ((IDisposable)releaser).Dispose();
     }
 }
 public static async Task Set(object args)
 {
   using (await DownloadsService.AsyncLock.LockAsync())
   {
     // ISSUE: reference to a compiler-generated field
     if (DownloadsService.\u003CSet\u003Eo__SiteContainer6.\u003C\u003Ep__Site7 == null)
     {
       // ISSUE: reference to a compiler-generated field
       DownloadsService.\u003CSet\u003Eo__SiteContainer6.\u003C\u003Ep__Site7 = CallSite<Func<CallSite, object, JToken>>.Create(Binder.Convert(CSharpBinderFlags.ConvertExplicit, typeof (JToken), typeof (DownloadsService)));
     }
     // ISSUE: reference to a compiler-generated field
     Func<CallSite, object, JToken> func = DownloadsService.\u003CSet\u003Eo__SiteContainer6.\u003C\u003Ep__Site7.Target;
     // ISSUE: reference to a compiler-generated field
     CallSite<Func<CallSite, object, JToken>> callSite = DownloadsService.\u003CSet\u003Eo__SiteContainer6.\u003C\u003Ep__Site7;
     // ISSUE: reference to a compiler-generated field
     if (DownloadsService.\u003CSet\u003Eo__SiteContainer6.\u003C\u003Ep__Site8 == null)
     {
       // ISSUE: reference to a compiler-generated field
       DownloadsService.\u003CSet\u003Eo__SiteContainer6.\u003C\u003Ep__Site8 = CallSite<Func<CallSite, object, object>>.Create(Binder.GetMember(CSharpBinderFlags.None, "downloads", typeof (DownloadsService), (IEnumerable<CSharpArgumentInfo>) new CSharpArgumentInfo[1]
       {
         CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, (string) null)
       }));
     }
     // ISSUE: reference to a compiler-generated field
     // ISSUE: reference to a compiler-generated field
     object obj1 = DownloadsService.\u003CSet\u003Eo__SiteContainer6.\u003C\u003Ep__Site8.Target((CallSite) DownloadsService.\u003CSet\u003Eo__SiteContainer6.\u003C\u003Ep__Site8, args);
     JToken obj = func((CallSite) callSite, obj1);
     RealmDownloadItem[] downloads = obj.ToObject<RealmDownloadItem[]>();
     RealmDownloadsDescription description = new RealmDownloadsDescription()
     {
       Downloads = downloads
     };
     AccountSettings settings = await JsApiService.Client.Invoke<AccountSettings>("riot.accounts.get", (object) false);
     AccountConfig[] accounts = settings.Accounts;
     description.Downloads = Enumerable.ToArray<RealmDownloadItem>(Enumerable.Where<RealmDownloadItem>((IEnumerable<RealmDownloadItem>) description.Downloads, (Func<RealmDownloadItem, bool>) (x => Enumerable.Any<AccountConfig>((IEnumerable<AccountConfig>) accounts, (Func<AccountConfig, bool>) (account => string.Equals(account.RealmId, x.RealmId, StringComparison.OrdinalIgnoreCase))))));
     object obj2 = await JsApiService.Client.Invoke<object>("storage.set", new object[2]
     {
       (object) "download-realms",
       (object) description
     });
     JsApiService.Client.Purge<RealmDownloadsDescription>("storage.get", (object) "download-realms");
   }
 }