示例#1
0
文件: lwf_core.cs 项目: osdakira/lwf
 public void RemoveExecHandler(ExecHandler execHandler)
 {
     if (m_execHandlers == null)
     {
         return;
     }
     m_execHandlers.RemoveAll(h => h == execHandler);
 }
示例#2
0
文件: lwf_core.cs 项目: osdakira/lwf
 public void AddExecHandler(ExecHandler execHandler)
 {
     if (m_execHandlers == null)
     {
         m_execHandlers = new ExecHandlerList();
     }
     m_execHandlers.Add(execHandler);
 }
示例#3
0
        /// <summary>
        /// Use the provided <seealso cref="Looper"/> instead of the default one and take a callback
        /// interface in which to handle messages.
        /// </summary>
        /// <param name="looper"> The looper, must not be null. </param>
        /// <param name="callback"> The callback interface in which to handle messages, or null. </param>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: public WeakHandler(@NonNull android.os.Looper looper, @NonNull android.os.Handler.ICallback callback)
        public WeakHandler(Looper looper, Handler.ICallback callback)
        {
            if (!InstanceFieldsInitialized)
            {
                InitializeInstanceFields();
                InstanceFieldsInitialized = true;
            }
            mCallback = callback;
            mExec     = new ExecHandler(looper, new WeakReference((Java.Lang.Object)callback));
        }
示例#4
0
        /// <summary>
        /// Use the provided <seealso cref="Looper"/> instead of the default one.
        /// </summary>
        /// <param name="looper"> The looper, must not be null. </param>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: public WeakHandler(@NonNull android.os.Looper looper)
        public WeakHandler(Looper looper)
        {
            if (!InstanceFieldsInitialized)
            {
                InitializeInstanceFields();
                InstanceFieldsInitialized = true;
            }
            mCallback = null;
            mExec     = new ExecHandler(looper);
        }
示例#5
0
        /// <summary>
        /// Constructor associates this handler with the <seealso cref="Looper"/> for the
        /// current thread and takes a callback interface in which you can handle
        /// messages.
        ///
        /// If this thread does not have a looper, this handler won't be able to receive messages
        /// so an exception is thrown.
        /// </summary>
        /// <param name="callback"> The callback interface in which to handle messages, or null. </param>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: public WeakHandler(@Nullable android.os.Handler.ICallback callback)
        public WeakHandler(Handler.ICallback callback)
        {
            if (!InstanceFieldsInitialized)
            {
                InitializeInstanceFields();
                InstanceFieldsInitialized = true;
            }
            mCallback = callback;                                                   // Hard referencing body

            mExec = new ExecHandler(new WeakReference((Java.Lang.Object)callback)); // Weak referencing inside ExecHandler
        }
示例#6
0
文件: lwf_core.cs 项目: osdakira/lwf
 public void SetExecHandler(ExecHandler execHandler)
 {
     ClearExecHandler();
     AddExecHandler(execHandler);
 }
示例#7
0
文件: lwf_core.cs 项目: rayyee/lwf
	public void SetExecHandler(ExecHandler execHandler)
	{
		ClearExecHandler();
		AddExecHandler(execHandler);
	}
示例#8
0
文件: lwf_core.cs 项目: rayyee/lwf
	public void RemoveExecHandler(ExecHandler execHandler)
	{
		if (m_execHandlers == null)
			return;
		m_execHandlers.RemoveAll(h => h == execHandler);
	}
示例#9
0
文件: lwf_core.cs 项目: rayyee/lwf
	public void AddExecHandler(ExecHandler execHandler)
	{
		if (m_execHandlers == null)
			m_execHandlers = new ExecHandlerList();
		m_execHandlers.Add(execHandler);
	}