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

            AsyncOperation opt = item.GetOperation();

            RemoveAsyncOperation(opt);
            item.Release();
        }
Ejemplo n.º 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 ();
	}
Ejemplo n.º 3
0
	public void Clear()
	{
		Dictionary<AsyncOperation, Timer>.Enumerator iter = mDic.GetEnumerator ();
		while (iter.MoveNext()) {
			if (iter.Current.Value != null)
			{
				if (iter.Current.Value.UserData != null)
				{
					IAsyncOperationItem item = iter.Current.Value.UserData as IAsyncOperationItem;
					if (item != null)
						item.Release();
				}
				iter.Current.Value.Dispose();
			}
		}

		iter.Dispose ();
		mDic.Clear ();
	}