⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 irequestqueue.cs

📁 Microsoft Mobile Development Handbook的代码,有C#,VB,C++的
💻 CS
字号:
//===============================================================================
// Microsoft patterns & practices
// Mobile Client Software Factory - July 2006
//===============================================================================
// Copyright  Microsoft Corporation.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===============================================================================
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
//===============================================================================

using System;
using System.Collections.Generic;
using System.Text;

namespace Microsoft.Practices.Mobile.DisconnectedAgent
{
	public interface IRequestQueue
	{
		/// <summary>
		/// Event fired when a request is enqueued in the queue.
		/// </summary>
		event EventHandler RequestEnqueued;

		/// <summary>
		/// Enqueue a request.
		/// </summary>
		/// <param name="request">Request to be enqueued.</param>
		void Enqueue(Request request);

		/// <summary>
		/// Gets the total count of requests in the queue.
		/// </summary>
		/// <returns>Requests count in the queue.</returns>
		int GetCount();

		/// <summary>
		/// Gets the next request in the queue.
		/// </summary>
		/// <returns>The next request in the queue.</returns>
		Request GetNextRequest();

		/// <summary>
		/// Gets an iterator with the requests that contain the given string in the tag.
		/// </summary>
		/// <param name="tag">String to be searched.</param>
		/// <returns>IEnumerable with the matching requests.</returns>
		IEnumerable<Request> GetRequests(string tag);

		/// <summary>
		/// Gets an iterator with the requests that have equal or more stamps than the given value.
		/// </summary>
		/// <param name="stampsEqualOrMoreThan">Minimum stamps number for a request to be dispatched.</param>
		/// <returns>IEnumerable with the matching requests.</returns>
		IEnumerable<Request> GetRequests(uint stampsEqualOrMoreThan);
		
		/// <summary>
		/// Gets an iterator with all the requests in the queue.
		/// </summary>
		/// <returns>IEnumerable with all the requests.</returns>
		IEnumerable<Request> GetRequests();

		/// <summary>
		/// Gets a specific request by RequestId.
		/// </summary>
		/// <param name="requestId">Request Id to be searched.</param>
		/// <returns>The matching request or null if it's not found.</returns>
		Request GetRequest(Guid requestId);

		/// <summary>
		/// Removes a request from the queue if it exists.
		/// </summary>
		/// <param name="request">Request to be removed.</param>
		void Remove(Request request);
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -