mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2026-03-10 00:13:36 +08:00
50 lines
1.2 KiB
C#
50 lines
1.2 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace SKIT.FlurlHttpClient.Wechat
|
|
{
|
|
public sealed class WechatHttpCallInterceptorCollection : IEnumerable<WechatHttpCallInterceptor>
|
|
{
|
|
private readonly IList<WechatHttpCallInterceptor> _list;
|
|
|
|
public int Count
|
|
{
|
|
get { return _list.Count; }
|
|
}
|
|
|
|
public WechatHttpCallInterceptor this[int index]
|
|
{
|
|
get { return _list[index]; }
|
|
}
|
|
|
|
public WechatHttpCallInterceptorCollection()
|
|
{
|
|
_list = new List<WechatHttpCallInterceptor>();
|
|
}
|
|
|
|
public void Add(WechatHttpCallInterceptor interceptor)
|
|
{
|
|
_list.Add(interceptor);
|
|
}
|
|
|
|
public void Remove(WechatHttpCallInterceptor interceptor)
|
|
{
|
|
_list.Remove(interceptor);
|
|
}
|
|
|
|
public IEnumerator<WechatHttpCallInterceptor> GetEnumerator()
|
|
{
|
|
return _list.GetEnumerator();
|
|
}
|
|
|
|
IEnumerator IEnumerable.GetEnumerator()
|
|
{
|
|
return ((IEnumerable)_list).GetEnumerator();
|
|
}
|
|
}
|
|
}
|