本文整理汇总了C#中Org.IsExpired方法的典型用法代码示例。如果您正苦于以下问题:C# Org.IsExpired方法的具体用法?C# Org.IsExpired怎么用?C# Org.IsExpired使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Org
的用法示例。
在下文中一共展示了Org.IsExpired方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddCookie
/// <summary>
/// Adds an
/// <see cref="Org.Apache.Http.Cookie.Cookie">HTTP cookie</see>
/// , replacing any existing equivalent cookies.
/// If the given cookie has already expired it will not be added, but existing
/// values will still be removed.
/// </summary>
/// <param name="cookie">
/// the
/// <see cref="Org.Apache.Http.Cookie.Cookie">cookie</see>
/// to be added
/// </param>
/// <seealso cref="AddCookies(Org.Apache.Http.Cookie.Cookie[])">AddCookies(Org.Apache.Http.Cookie.Cookie[])
/// </seealso>
public virtual void AddCookie(Org.Apache.Http.Cookie.Cookie cookie)
{
lock (this)
{
if (cookie != null)
{
// first remove any old cookie that is equivalent
cookies.Remove(cookie);
if (!cookie.IsExpired(new DateTime()))
{
cookies.AddItem(cookie);
}
}
}
}
开发者ID:transformersprimeabcxyz,项目名称:_TO-DO-couchbase-lite-net-couchbase,代码行数:29,代码来源:BasicCookieStore.cs