internal AssetStoreAssetsInfo(AssetStoreResultBase<AssetStoreAssetsInfo>.Callback c, List<AssetStoreAsset> assets) : base(c)
		{
			foreach (AssetStoreAsset current in assets)
			{
				this.assets[current.id] = current;
			}
		}
예제 #2
0
 internal AssetStoreAssetsInfo(AssetStoreResultBase <AssetStoreAssetsInfo> .Callback c, List <AssetStoreAsset> assets) : base(c)
 {
     this.assets = new Dictionary <int, AssetStoreAsset>();
     foreach (AssetStoreAsset asset in assets)
     {
         this.assets[asset.id] = asset;
     }
 }
예제 #3
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);
            }));
        }
예제 #4
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)));
        }
 internal AssetStoreAssetsInfo(AssetStoreResultBase <AssetStoreAssetsInfo> .Callback c, List <AssetStoreAsset> assets)
     : base(c)
 {
     using (List <AssetStoreAsset> .Enumerator enumerator = assets.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             AssetStoreAsset current = enumerator.Current;
             this.assets[current.id] = current;
         }
     }
 }
예제 #6
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);
            }));
        }
예제 #7
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)));
        }
예제 #8
0
        internal static AsyncHTTPClient DirectPurchase(int packageID, string password, AssetStoreResultBase <PurchaseResult> .Callback callback)
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            AssetStoreClient.\u003CDirectPurchase\u003Ec__AnonStorey56 purchaseCAnonStorey56 = new AssetStoreClient.\u003CDirectPurchase\u003Ec__AnonStorey56();
            string url = AssetStoreClient.APIUrl(string.Format("/purchase/direct/{0}", (object)packageID.ToString()));

            // ISSUE: reference to a compiler-generated field
            purchaseCAnonStorey56.r = new PurchaseResult(callback);
            Dictionary <string, string> dictionary = new Dictionary <string, string>();

            dictionary["password"] = password;
            // ISSUE: reference to a compiler-generated method
            return(AssetStoreClient.CreateJSONRequestPost(url, dictionary, new AssetStoreClient.DoneCallback(purchaseCAnonStorey56.\u003C\u003Em__94)));
        }
예제 #9
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)));
        }
예제 #10
0
 public PurchaseResult(AssetStoreResultBase <PurchaseResult> .Callback c)
     : base(c)
 {
 }
예제 #11
0
 internal BuildPackageResult(AssetStoreAsset asset, AssetStoreResultBase <BuildPackageResult> .Callback c)
     : base(c)
 {
     this.asset     = asset;
     this.packageID = -1;
 }
 public AssetStoreSearchResults(AssetStoreResultBase <AssetStoreSearchResults> .Callback c) : base(c)
 {
 }
 public AssetStoreResultBase(AssetStoreResultBase <Derived> .Callback cb)
 {
     this.callback = cb;
     this.warnings = string.Empty;
 }
예제 #14
0
 public AssetStoreSearchResults(AssetStoreResultBase <AssetStoreSearchResults> .Callback c) : base(c)
 {
     this.groups = new List <Group>();
 }
예제 #15
0
        internal static AsyncHTTPClient DirectPurchase(int packageID, string password, AssetStoreResultBase <PurchaseResult> .Callback callback)
        {
            string         url = AssetStoreClient.APIUrl(string.Format("/purchase/direct/{0}", packageID.ToString()));
            PurchaseResult r   = new PurchaseResult(callback);
            Dictionary <string, string> dictionary = new Dictionary <string, string>();

            dictionary["password"] = password;
            return(AssetStoreClient.CreateJSONRequestPost(url, dictionary, delegate(AssetStoreResponse ar)
            {
                r.Parse(ar);
            }));
        }
예제 #16
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);
            }));
        }