Пример #1
0
        internal static AsyncHTTPClient SearchAssets(string searchString, string[] requiredClassNames, string[] assetLabels, List <AssetStoreClient.SearchCount> counts, AssetStoreResultBase <AssetStoreSearchResults> .Callback callback)
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            AssetStoreClient.\u003CSearchAssets\u003Ec__AnonStorey54 assetsCAnonStorey54 = new AssetStoreClient.\u003CSearchAssets\u003Ec__AnonStorey54();
            string str1 = string.Empty;
            string str2 = string.Empty;
            string str3 = string.Empty;
            string str4 = string.Empty;

            using (List <AssetStoreClient.SearchCount> .Enumerator enumerator = counts.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    AssetStoreClient.SearchCount current = enumerator.Current;
                    str1 = str1 + str4 + (object)current.offset;
                    str2 = str2 + str4 + (object)current.limit;
                    str3 = str3 + str4 + current.name;
                    str4 = ",";
                }
            }
            if (Array.Exists <string>(requiredClassNames, (Predicate <string>)(a => a.Equals("MonoScript", StringComparison.OrdinalIgnoreCase))))
            {
                Array.Resize <string>(ref requiredClassNames, requiredClassNames.Length + 1);
                requiredClassNames[requiredClassNames.Length - 1] = "Script";
            }
            string url = string.Format("{0}&q={1}&c={2}&l={3}&O={4}&N={5}&G={6}", (object)AssetStoreClient.APISearchUrl("/search/assets"), (object)Uri.EscapeDataString(searchString), (object)Uri.EscapeDataString(string.Join(",", requiredClassNames)), (object)Uri.EscapeDataString(string.Join(",", assetLabels)), (object)str1, (object)str2, (object)str3);

            // ISSUE: reference to a compiler-generated field
            assetsCAnonStorey54.r = new AssetStoreSearchResults(callback);
            // ISSUE: reference to a compiler-generated method
            return(AssetStoreClient.CreateJSONRequest(url, new AssetStoreClient.DoneCallback(assetsCAnonStorey54.\u003C\u003Em__92)));
        }
Пример #2
0
        internal static AsyncHTTPClient BuildPackage(AssetStoreAsset asset, AssetStoreResultBase <BuildPackageResult> .Callback callback)
        {
            string             url = AssetStoreClient.APIUrl("/content/download/" + asset.packageID.ToString());
            BuildPackageResult r   = new BuildPackageResult(asset, callback);

            return(AssetStoreClient.CreateJSONRequest(url, delegate(AssetStoreResponse ar)
            {
                r.Parse(ar);
            }));
        }
Пример #3
0
        internal static AsyncHTTPClient BuildPackage(AssetStoreAsset asset, AssetStoreResultBase <BuildPackageResult> .Callback callback)
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            AssetStoreClient.\u003CBuildPackage\u003Ec__AnonStorey57 packageCAnonStorey57 = new AssetStoreClient.\u003CBuildPackage\u003Ec__AnonStorey57();
            string url = AssetStoreClient.APIUrl("/content/download/" + asset.packageID.ToString());

            // ISSUE: reference to a compiler-generated field
            packageCAnonStorey57.r = new BuildPackageResult(asset, callback);
            // ISSUE: reference to a compiler-generated method
            return(AssetStoreClient.CreateJSONRequest(url, new AssetStoreClient.DoneCallback(packageCAnonStorey57.\u003C\u003Em__95)));
        }
Пример #4
0
        internal static AsyncHTTPClient AssetsInfo(List <AssetStoreAsset> assets, AssetStoreResultBase <AssetStoreAssetsInfo> .Callback callback)
        {
            string text = AssetStoreClient.APIUrl("/assets/list");

            foreach (AssetStoreAsset current in assets)
            {
                text = text + "&id=" + current.id.ToString();
            }
            AssetStoreAssetsInfo r = new AssetStoreAssetsInfo(callback, assets);

            return(AssetStoreClient.CreateJSONRequest(text, delegate(AssetStoreResponse ar)
            {
                r.Parse(ar);
            }));
        }
Пример #5
0
        internal static AsyncHTTPClient AssetsInfo(List <AssetStoreAsset> assets, AssetStoreResultBase <AssetStoreAssetsInfo> .Callback callback)
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            AssetStoreClient.\u003CAssetsInfo\u003Ec__AnonStorey55 infoCAnonStorey55 = new AssetStoreClient.\u003CAssetsInfo\u003Ec__AnonStorey55();
            string url = AssetStoreClient.APIUrl("/assets/list");

            using (List <AssetStoreAsset> .Enumerator enumerator = assets.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    AssetStoreAsset current = enumerator.Current;
                    url = url + "&id=" + current.id.ToString();
                }
            }
            // ISSUE: reference to a compiler-generated field
            infoCAnonStorey55.r = new AssetStoreAssetsInfo(callback, assets);
            // ISSUE: reference to a compiler-generated method
            return(AssetStoreClient.CreateJSONRequest(url, new AssetStoreClient.DoneCallback(infoCAnonStorey55.\u003C\u003Em__93)));
        }
Пример #6
0
        internal static AsyncHTTPClient SearchAssets(string searchString, string[] requiredClassNames, string[] assetLabels, List <AssetStoreClient.SearchCount> counts, AssetStoreResultBase <AssetStoreSearchResults> .Callback callback)
        {
            string text  = string.Empty;
            string text2 = string.Empty;
            string text3 = string.Empty;
            string text4 = string.Empty;

            foreach (AssetStoreClient.SearchCount current in counts)
            {
                text  = text + text4 + current.offset;
                text2 = text2 + text4 + current.limit;
                text3 = text3 + text4 + current.name;
                text4 = ",";
            }
            if (Array.Exists <string>(requiredClassNames, (string a) => a.Equals("MonoScript", StringComparison.OrdinalIgnoreCase)))
            {
                Array.Resize <string>(ref requiredClassNames, requiredClassNames.Length + 1);
                requiredClassNames[requiredClassNames.Length - 1] = "Script";
            }
            string url = string.Format("{0}&q={1}&c={2}&l={3}&O={4}&N={5}&G={6}", new object[]
            {
                AssetStoreClient.APISearchUrl("/search/assets"),
                Uri.EscapeDataString(searchString),
                Uri.EscapeDataString(string.Join(",", requiredClassNames)),
                Uri.EscapeDataString(string.Join(",", assetLabels)),
                text,
                text2,
                text3
            });
            AssetStoreSearchResults r = new AssetStoreSearchResults(callback);

            return(AssetStoreClient.CreateJSONRequest(url, delegate(AssetStoreResponse ar)
            {
                r.Parse(ar);
            }));
        }