Beispiel #1
0
        /// <summary>
        /// 現在の配信端末情報を取得します。
        /// </summary>
        /// <returns>配信端末情報 </returns>
        public static NCMBInstallation getCurrentInstallation()
        {
            NCMBInstallation currentInstallation = null;

            try {
                //ローカルファイルに配信端末情報があれば取得、なければ新規作成
                string currentInstallationData = NCMBManager.GetCurrentInstallation();
                if (currentInstallationData != "")
                {
                    //ローカルファイルから端末情報を取得
                    currentInstallation = new NCMBInstallation(currentInstallationData);
                }
                else
                {
                    currentInstallation = new NCMBInstallation();
                }
            } catch (SystemException error) {
                throw new NCMBException(error);
            }
            return(currentInstallation);
        }
 /// <summary>
 /// 現在の配信端末情報を取得します。
 /// </summary>
 /// <returns>配信端末情報 </returns>
 public static NCMBInstallation getCurrentInstallation()
 {
     NCMBInstallation currentInstallation = null;
     try {
         //null check
         NCMBManager manager = new NCMBManager ();
         //ローカルファイルに配信端末情報があれば取得、なければ新規作成
         string currentInstallationData = manager.GetCurrentInstallation ();
         if (currentInstallationData != "") {
             //ローカルファイルから端末情報を取得
             currentInstallation = new NCMBInstallation (currentInstallationData);
         } else {
             currentInstallation = new NCMBInstallation ();
         }
     } catch (SystemException error) {
         throw new NCMBException (error);
     }
     return currentInstallation;
 }