protected void RemoveAsyncOperation(IAsyncOperationItem item)
        {
            if (item == null)
            {
                return;
            }

            AsyncOperation opt = item.GetOperation();

            RemoveAsyncOperation(opt);
            item.Release();
        }
예제 #2
0
	public void RemoveAsyncOperation(IAsyncOperationItem item)
	{
		if (item == null)
			return;
		
		Timer time;
		AsyncOperation opt = item.GetOperation ();
		if (mDic.TryGetValue (opt, out time) && (time != null)) {
			mDic.Remove(opt);
			time.Dispose();
		}
		
		item.Release ();
	}
    public AsyncOperation GetAsyncOptionTimerOpr(Timer obj)
    {
        if (obj == null)
        {
            return(null);
        }
        IAsyncOperationItem item = (IAsyncOperationItem)obj.UserData;

        if (item == null)
        {
            return(null);
        }
        AsyncOperation opt = item.GetOperation();

        return(opt);
    }
예제 #4
0
	protected  void OnTimerEvent(Timer obj, float timer)
	{
		IAsyncOperationItem item = (IAsyncOperationItem)obj.UserData;
		if (item == null) {
			obj.Dispose();
			return;
		}

		AsyncOperation opt = item.GetOperation ();
		if (opt == null) {
			obj.Dispose();
			return;
		}

		item.Process ();
		if (opt.isDone)
			RemoveAsyncOperation(item);

	}
        protected void OnTimerEvent(TimerInfo obj, float timer)
        {
            IAsyncOperationItem item = (IAsyncOperationItem)obj.target;

            if (item.IsDelete())
            {
                mDeleteList.Add(item);
                return;
            }

            AsyncOperation opt = item.GetOperation();

            item.Process();

            if (opt.isDone)
            {
                mDeleteList.Add(item);
            }

            //RemoveAsyncOperation(item);
        }