Remove unused variable (#4694)
[platform/core/csapi/tizenfx.git] / src / Tizen.Applications.Common / Tizen.Applications / CoreApplication.cs
index 5a49c65..fa386df 100644 (file)
@@ -37,8 +37,6 @@ namespace Tizen.Applications
         private readonly ICoreTask _task;
         private bool _disposedValue = false;
 
-        private static System.Timers.Timer sTimer;
-
         /// <summary>
         /// Initializes the CoreApplication class.
         /// </summary>
@@ -280,32 +278,40 @@ namespace Tizen.Applications
         }
 
         /// <summary>
-        /// Dispatches an asynchronous message to the main loop of the CoreTask.
+        /// Dispatches an asynchronous message to a main loop of the CoreApplication.
         /// </summary>
+        /// <remarks>
+        /// If an application uses UI thread App Model, the asynchronous message will be delivered to the UI thread.
+        /// If not, the asynchronous message will be delivered to the main thread.
+        /// </remarks>
         /// <param name="runner">The runner callaback.</param>
         /// <exception cref="ArgumentNullException">Thrown when the runner is null.</exception>
         /// <since_tizen> 10 </since_tizen>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public void Post(Action runner)
+        public static void Post(Action runner)
         {
             if (runner == null)
             {
                 throw new ArgumentNullException(nameof(runner));
             }
 
-            GSourceManager.Post(runner);
+            GSourceManager.Post(runner, true);
         }
 
         /// <summary>
-        /// Dispatches an asynchronous message to the main loop of the CoreTask.
+        /// Dispatches an asynchronous message to a main loop of the CoreApplication.
         /// </summary>
+        /// <remarks>
+        /// If an application uses UI thread App Model, the asynchronous message will be delivered to the UI thread.
+        /// If not, the asynchronous message will be delivered to the main thread.
+        /// </remarks>
         /// <typeparam name="T">The type of the result.</typeparam>
         /// <param name="runner">The runner callback.</param>
         /// <exception cref="ArgumentNullException">Thrown when the runner is null.</exception>
         /// <returns>A task with the result.</returns>
         /// <since_tizen> 10 </since_tizen>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public async Task<T> Post<T>(Func<T> runner)
+        public static async Task<T> Post<T>(Func<T> runner)
         {
             if (runner == null)
             {
@@ -313,7 +319,7 @@ namespace Tizen.Applications
             }
 
             var task = new TaskCompletionSource<T>();
-            GSourceManager.Post(() => { task.SetResult(runner()); });
+            GSourceManager.Post(() => { task.SetResult(runner()); }, true);
             return await task.Task.ConfigureAwait(false);
         }