コード例 #1
0
ファイル: XMLAccess.cs プロジェクト: xplusplus/ASCOMPlatform
        internal void DeleteKey(string p_SubKeyName)
        {
            // Delete a key
            try
            {
                GetProfileMutex("DeleteKey", p_SubKeyName);
                sw.Reset(); sw.Start(); // Start timing this call
                TL.LogMessage("DeleteKey", "SubKey: \"" + p_SubKeyName + "\"");

                try
                {
                    FileStore.DeleteDirectory(p_SubKeyName);
                }
                catch (Exception ex)
                {
                } // Remove it if at all possible but don't throw any errors
                sw.Stop(); TL.LogMessage("  ElapsedTime", "  " + sw.ElapsedMilliseconds + " milliseconds");
            }
            finally
            {
                ProfileMutex.ReleaseMutex();
            }
        }