コード例 #1
0
 public static AnalyticsResult StoreOpened(StoreType storeType, IDictionary <string, object> eventData = null)
 {
     AnalyticsEvent.m_EventData.Clear();
     AnalyticsEvent.m_EventData.Add("type", AnalyticsEvent.RenameEnum(storeType.ToString()));
     AnalyticsEvent.AddCustomEventData(eventData);
     return(AnalyticsEvent.Custom("store_opened", AnalyticsEvent.m_EventData));
 }
コード例 #2
0
        public static string Get(StoreType storeType)
        {
            if (StoreTypeCache.TryGetValue(storeType, out string enumString) == false)
            {
                enumString = storeType.ToString();
                StoreTypeCache.Add(storeType, enumString);
            }

            return(enumString);
        }
コード例 #3
0
        public override string ToString()
        {
            string name = "[" + Name;

            if (CodeType != null)
            {
                name += ", Type:" + CodeType.Name;
            }
            name += ", Access:" + AccessLevel.ToString();
            name += ", Store:" + StoreType.ToString();
            name += "]";
            return(name);
        }
コード例 #4
0
ファイル: LocalDataBase.cs プロジェクト: wxfzy/LogixTool
        /// <summary>
        /// Получает отрибут перечисления типа данных StoreType.
        /// </summary>
        /// <param name="type">Тип данных.</param>
        /// <returns></returns>
        private static TypeAttribute GetStoreTypeTextAttribute(StoreType type)
        {
            // Получение текстового атрибута.
            TypeAttribute[] attributes = typeof(StoreType).GetField(type.ToString())
                                         .GetCustomAttributes(typeof(TypeAttribute), false)
                                         .Where(o => o is TypeAttribute)
                                         .Select(t => (TypeAttribute)t).ToArray();

            if (attributes.Length == 1)
            {
                return(attributes[0]);
            }

            return(null);
        }
コード例 #5
0
 public static AnalyticsResult StoreItemClick(StoreType storeType, string itemId, string itemName = null, IDictionary <string, object> eventData = null)
 {
     AnalyticsEvent.m_EventData.Clear();
     AnalyticsEvent.m_EventData.Add("type", AnalyticsEvent.RenameEnum(storeType.ToString()));
     if (string.IsNullOrEmpty(itemId))
     {
         throw new ArgumentException(itemId);
     }
     AnalyticsEvent.m_EventData.Add("item_id", itemId);
     if (!string.IsNullOrEmpty(itemName))
     {
         AnalyticsEvent.m_EventData.Add("item_name", itemName);
     }
     AnalyticsEvent.AddCustomEventData(eventData);
     return(AnalyticsEvent.Custom("store_item_click", AnalyticsEvent.m_EventData));
 }
コード例 #6
0
ファイル: CmdStore.cs プロジェクト: steve-stanton/AltCmdStore
        public static CmdStore CreateStore(CmdData args)
        {
            StoreType type = args.GetEnum <StoreType>(nameof(ICreateStore.Type));

            if (type == StoreType.File)
            {
                return(FileStore.Create(args));
            }

            if (type == StoreType.SQLite)
            {
                return(SQLiteStore.Create(args));
            }

            if (type == StoreType.Memory)
            {
                return(MemoryStore.Create(args));
            }

            throw new NotImplementedException(type.ToString());
        }
コード例 #7
0
ファイル: IAPData.cs プロジェクト: xiaoleMu/FantasyDollStore
 public override string ToString()
 {
     return(string.Format("[IAPData: Store={0}, iapId={1}]", store.ToString(), iapId));
 }
コード例 #8
0
ファイル: Store.cs プロジェクト: jkwchunjae/ProjectSIA
        public static Store CreateStore(ProjectSIAEntities db, string name, DateTime beginDate, DateTime endDate, StoreType type, StoreRule rule, double value)
        {
            using (var wl = new WriteLock())
            {
                if (endDate <= beginDate)
                    throw new AutistarException("종료일이 시작일보다 빠릅니다.");

                var newStore = db.Store.Add(new ProjectSIA.Store { name = name, beginDate = beginDate, endDate = endDate, type = type.ToString(), rule = rule.ToString(), value = value });
                var rows = db.SaveChanges();
                if (rows != 1)
                    throw new AutistarException("행사장(거래처) 추가 중 DB 작업이 실패했습니다.");
                var store = new Store(newStore);
                _storeList.Add(store);
                return store;
            }
        }
コード例 #9
0
ファイル: Build.cs プロジェクト: alex-dmtr/Clash-of-Kings
    private static string GetBuildIncludesDirectory(BuildTarget target, StoreType store)
    {
        string buildLocation = Path.GetFullPath(Application.dataPath + "/../../BuildIncludes/");

        if (store != StoreType.None)
        {
            buildLocation += string.Format("{0}/", store.ToString());
        }
        else
        {
            buildLocation += "NoStore/";
        }

        if (target == BuildTarget.StandaloneWindows)
        {
            buildLocation += "Windows/";
        }
        else if (target == BuildTarget.StandaloneOSXIntel)
        {
            buildLocation += "Mac/";
        }
        else if (target == BuildTarget.StandaloneLinux)
        {
            buildLocation += "Linux/";
        }
        else if (target == BuildTarget.iOS)
        {
            buildLocation += "iOS/";
        }
        else if (target == BuildTarget.Android)
        {
            buildLocation += "Android/";
        }

        return buildLocation;
    }
コード例 #10
0
ファイル: Build.cs プロジェクト: alex-dmtr/Clash-of-Kings
    private static void BuildUnityProject(BuildTarget target, BuildOptions options, StoreType store, string buildLocation, string buildFile)
    {
        PlayerSettings.companyName = AppInfo.companyName;
        PlayerSettings.productName = AppInfo.longName;

        PlayerSettings.bundleIdentifier = AppInfo.appleBundleId;
        PlayerSettings.bundleVersion = AppInfo.fullVersion;

        List<string> buildScenes = new List<string>(scenes);

        // if you need to define multiple symbols, separate them with a semicolon (;)
        string defineSymbols = "STORE_" + store.ToString().ToUpper();

        // generally want player logs enabled in case something weird happens and we can get some
        // info from it. just don't be stupid with logging debug stuff on release.
        PlayerSettings.usePlayerLog = true;

        // platform specific options
        if (target == BuildTarget.Android)
        {
            PlayerSettings.defaultInterfaceOrientation = UIOrientation.LandscapeRight;
            PlayerSettings.Android.minSdkVersion = AndroidSdkVersions.AndroidApiLevel9;

            //PlayerSettings.Android.keystorePass = "";
            //PlayerSettings.Android.keyaliasName = "";
            //PlayerSettings.Android.keyaliasPass = "";

            // ensure the versioncode increases by 1, for Google Play, this is important if you're building
            // multiple APKs per release.
            PlayerSettings.Android.bundleVersionCode += 1;

            PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Android, defineSymbols);
        }
        else if (target.ToString().Contains("Standalone"))
        {
            PlayerSettings.useMacAppStoreValidation = false;

            PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Standalone, defineSymbols);
        }
        else if (target == BuildTarget.iOS)
        {
            PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.iOS, defineSymbols);
        }

        // store-specific options
        if (store == StoreType.MacAppStore)
        {
            // Mac App Store is very picky about where applications can write to, and I've been told that people
            // have failed certification when they left usePlayerLog on. Since dealing with all of the permissions
            // and whatnot on MAS is enough of a pain, I'm going to trust them and disable it.
            PlayerSettings.useMacAppStoreValidation = true;
            PlayerSettings.usePlayerLog = false;
        }

        string buildResult = BuildPipeline.BuildPlayer(buildScenes.ToArray(), buildLocation + buildFile, target, options);

        // error logs
        if (!string.IsNullOrEmpty(buildResult))
        {
            Debug.LogError(buildResult);
        }
        else
        {
            Debug.Log("[BUILD] Unity Build Successful.");
        }
    }
コード例 #11
0
ファイル: Build.cs プロジェクト: alex-dmtr/Clash-of-Kings
    protected static void RunBuild(BuildTarget target, BuildOptions options, StoreType store)
    {
        ClearLog();

        AppInfo.CheckForDefaults();

        string buildLocation = GetBuildDirectory(target, store);
        string buildFile = GetBuildFile(target);

        Debug.Log(string.Format("[BUILD] [{0} : {1}] Started @ {2:MM/dd/yy hh:mm:ss}", store.ToString(), target.ToString(), DateTime.Now));

        BuildCreateFolder(buildLocation, buildFile, target);

        BuildUnityProject(target, options, store, buildLocation, buildFile);

        BuildCopyIncludes(target, store);

        BuildZip(buildLocation, buildFile, target, store);

        Debug.Log(string.Format("[BUILD] [{0} : {1}] Completed @ {2:MM/dd/yy hh:mm:ss}.", store.ToString(), target.ToString(), DateTime.Now));
    }
コード例 #12
0
ファイル: FileIdentifier.cs プロジェクト: geffzhang/sharp-abp
 /// <summary>重写ToString方法
 /// </summary>
 public override string ToString()
 {
     return($"[存储类型:{StoreType.ToString()},PatchName:{Patch.Name},FileId:{FileId}]");
 }
 private static string getKey(StoreType type)
 {
     return(type.ToString());
 }
コード例 #14
0
ファイル: GamerStore.cs プロジェクト: StudioJD/unity-sdk
 /// <summary>
 /// Last step in the purchase. Validates the receipt received by a native purchase. You may have to do additional
 /// steps to close your purchase process.
 /// </summary>
 /// <returns>Promise indicating whether the recceipt was validated properly. In case of exception, you can inspect why
 ///     the receipt failed to verify.</returns>
 /// <param name="storeType">Type of Store, should be provided by the store plugin. Valid are appstore, macstore, googleplay.</param>
 /// <param name="cotcProductId">ID of the product purchased (as configured on the backoffice).</param>
 /// <param name="paidPrice">Paid price in units.</param>
 /// <param name="paidCurrency">Currency of paid price (ISO code).</param>
 /// <param name="receipt">Receipt string, dependent on the store type.</param>
 public Promise<ValidateReceiptResult> ValidateReceipt(StoreType storeType, string cotcProductId, float paidPrice, string paidCurrency, string receipt)
 {
     HttpRequest req = Gamer.MakeHttpRequest("/v1/gamer/store/validateReceipt");
     Bundle data = Bundle.CreateObject();
     data["store"] = storeType.ToString().ToLower();
     data["productId"] = cotcProductId;
     data["price"] = paidPrice;
     data["currency"] = paidCurrency;
     data["receipt"] = receipt;
     req.BodyJson = data;
     return Common.RunInTask<ValidateReceiptResult>(req, (response, task) => {
         task.PostResult(new ValidateReceiptResult(response.BodyJson));
     });
 }
コード例 #15
0
        /// <summary>
        /// <para>Performs the method:</para>
        /// <para>Search for Stores.</para>
        /// <para>As specified in the API Documentation.</para>
        /// <para>Creates a query string using the paramaters provided - parameters can be null if they are not required for the request.</para>
        /// <para> DOES NOT REQURE AUTHENTICATION.</para>
        /// </summary>
        /// <param name="searchString">The string to search for.</param>
        /// <param name="page">The number of the page to retrieve.</param>
        /// <param name="category">The category to search in.</param>
        /// <param name="storeType">The type of the store.</param>
        /// <returns>Stores</returns>
        public Stores SearchStores(string searchString = "", int page = 1, string category = "", StoreType storeType = StoreType.Normal)
        {
            var url = String.Format(Constants.Culture, "{0}/Stores{1}", Constants.SEARCH, Constants.XML);
            var conditions = "?";
            _addAnd = false;
            conditions += category != ""
                              ? SearchMethods.ConstructQueryHelper(Constants.CATEGORY, category, _addAnd)
                              : "";
            conditions += SearchMethods.ConstructQueryHelper("store_type", storeType.ToString(), _addAnd);
            conditions += SearchMethods.ConstructQueryHelper(Constants.PAGE, page.ToString(), _addAnd);
            conditions += searchString != ""
                              ? SearchMethods.ConstructQueryHelper(Constants.SEARCH_STRING, searchString, _addAnd)
                              : "";

            if (!conditions.Equals("?"))
            {
                url += conditions;
            }

            var finalUrl = _connection.BaseUrl + url;

            var getRequest = _connection.UnauthenticatedConnection(finalUrl);
            var xml = getRequest.ToString();

            return Deserializer<Stores>.Deserialize(new Stores(), xml);
        }