コード例 #1
0
ファイル: NtCore.cs プロジェクト: noahhusby/NetworkTables
        /// <summary>
        ///Deletes all non-persistent entries from the table
        /// </summary>
        public static void DeleteAllEntries()
        {
#if CORE
            CoreMethods.DeleteAllEntries();
#else
            Storage.Instance.DeleteAllEntries();
#endif
        }
コード例 #2
0
        public void TestDeleteAllEntries()
        {
            string key1     = "testKey";
            string toWrite1 = "written";

            CoreMethods.SetEntryString(key1, toWrite1);

            string key2     = "testKey2";
            double toWrite2 = 3.58;

            CoreMethods.SetEntryDouble(key2, toWrite2);

            Assert.That(CoreMethods.GetEntries("", 0).Length, Is.EqualTo(2));

            CoreMethods.DeleteAllEntries();

            Assert.That(CoreMethods.GetEntries("", 0).Length, Is.EqualTo(0));

            const string err = "error";

            Assert.That(CoreMethods.GetEntryString(key1, err), Is.EqualTo(err));
            Assert.That(CoreMethods.GetEntryString(key2, err), Is.EqualTo(err));
        }
コード例 #3
0
 public void SetUp()
 {
     CoreMethods.DeleteAllEntries();
 }
コード例 #4
0
 public void SetUp()
 {
     CoreMethods.DeleteAllEntries();
     m_nt = NetworkTable.GetTable("");
 }
コード例 #5
0
 /// <summary>
 /// Deletes ALL keys in ALL subtables. Use with caution!
 /// </summary>
 public static void GlobalDeleteAll()
 {
     CoreMethods.DeleteAllEntries();
 }
コード例 #6
0
 public void TestSetup()
 {
     CoreMethods.DeleteAllEntries();
     m_table = NetworkTable.GetTable("Table");
 }