|
| 1 | +// Copyright (c) .NET Foundation. All rights reserved. |
| 2 | +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. |
| 3 | + |
| 4 | +namespace Microsoft.Extensions.Caching.Distributed |
| 5 | +{ |
| 6 | + public static partial class DistributedCacheEntryExtensions |
| 7 | + { |
| 8 | + public static Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions SetAbsoluteExpiration(this Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options, System.DateTimeOffset absolute) { throw null; } |
| 9 | + public static Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions SetAbsoluteExpiration(this Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options, System.TimeSpan relative) { throw null; } |
| 10 | + public static Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions SetSlidingExpiration(this Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options, System.TimeSpan offset) { throw null; } |
| 11 | + } |
| 12 | + public partial class DistributedCacheEntryOptions |
| 13 | + { |
| 14 | + public DistributedCacheEntryOptions() { } |
| 15 | + public System.DateTimeOffset? AbsoluteExpiration { get { throw null; } set { } } |
| 16 | + public System.TimeSpan? AbsoluteExpirationRelativeToNow { get { throw null; } set { } } |
| 17 | + public System.TimeSpan? SlidingExpiration { get { throw null; } set { } } |
| 18 | + } |
| 19 | + public static partial class DistributedCacheExtensions |
| 20 | + { |
| 21 | + public static string GetString(this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key) { throw null; } |
| 22 | + [System.Diagnostics.DebuggerStepThroughAttribute] |
| 23 | + public static System.Threading.Tasks.Task<string> GetStringAsync(this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) { throw null; } |
| 24 | + public static void Set(this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, byte[] value) { } |
| 25 | + public static System.Threading.Tasks.Task SetAsync(this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, byte[] value, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) { throw null; } |
| 26 | + public static void SetString(this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, string value) { } |
| 27 | + public static void SetString(this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, string value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options) { } |
| 28 | + public static System.Threading.Tasks.Task SetStringAsync(this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, string value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) { throw null; } |
| 29 | + public static System.Threading.Tasks.Task SetStringAsync(this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, string value, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) { throw null; } |
| 30 | + } |
| 31 | + public partial interface IDistributedCache |
| 32 | + { |
| 33 | + byte[] Get(string key); |
| 34 | + System.Threading.Tasks.Task<byte[]> GetAsync(string key, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)); |
| 35 | + void Refresh(string key); |
| 36 | + System.Threading.Tasks.Task RefreshAsync(string key, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)); |
| 37 | + void Remove(string key); |
| 38 | + System.Threading.Tasks.Task RemoveAsync(string key, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)); |
| 39 | + void Set(string key, byte[] value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options); |
| 40 | + System.Threading.Tasks.Task SetAsync(string key, byte[] value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)); |
| 41 | + } |
| 42 | +} |
| 43 | +namespace Microsoft.Extensions.Caching.Memory |
| 44 | +{ |
| 45 | + public static partial class CacheEntryExtensions |
| 46 | + { |
| 47 | + public static Microsoft.Extensions.Caching.Memory.ICacheEntry AddExpirationToken(this Microsoft.Extensions.Caching.Memory.ICacheEntry entry, Microsoft.Extensions.Primitives.IChangeToken expirationToken) { throw null; } |
| 48 | + public static Microsoft.Extensions.Caching.Memory.ICacheEntry RegisterPostEvictionCallback(this Microsoft.Extensions.Caching.Memory.ICacheEntry entry, Microsoft.Extensions.Caching.Memory.PostEvictionDelegate callback) { throw null; } |
| 49 | + public static Microsoft.Extensions.Caching.Memory.ICacheEntry RegisterPostEvictionCallback(this Microsoft.Extensions.Caching.Memory.ICacheEntry entry, Microsoft.Extensions.Caching.Memory.PostEvictionDelegate callback, object state) { throw null; } |
| 50 | + public static Microsoft.Extensions.Caching.Memory.ICacheEntry SetAbsoluteExpiration(this Microsoft.Extensions.Caching.Memory.ICacheEntry entry, System.DateTimeOffset absolute) { throw null; } |
| 51 | + public static Microsoft.Extensions.Caching.Memory.ICacheEntry SetAbsoluteExpiration(this Microsoft.Extensions.Caching.Memory.ICacheEntry entry, System.TimeSpan relative) { throw null; } |
| 52 | + public static Microsoft.Extensions.Caching.Memory.ICacheEntry SetOptions(this Microsoft.Extensions.Caching.Memory.ICacheEntry entry, Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options) { throw null; } |
| 53 | + public static Microsoft.Extensions.Caching.Memory.ICacheEntry SetPriority(this Microsoft.Extensions.Caching.Memory.ICacheEntry entry, Microsoft.Extensions.Caching.Memory.CacheItemPriority priority) { throw null; } |
| 54 | + public static Microsoft.Extensions.Caching.Memory.ICacheEntry SetSize(this Microsoft.Extensions.Caching.Memory.ICacheEntry entry, long size) { throw null; } |
| 55 | + public static Microsoft.Extensions.Caching.Memory.ICacheEntry SetSlidingExpiration(this Microsoft.Extensions.Caching.Memory.ICacheEntry entry, System.TimeSpan offset) { throw null; } |
| 56 | + public static Microsoft.Extensions.Caching.Memory.ICacheEntry SetValue(this Microsoft.Extensions.Caching.Memory.ICacheEntry entry, object value) { throw null; } |
| 57 | + } |
| 58 | + public static partial class CacheExtensions |
| 59 | + { |
| 60 | + public static object Get(this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key) { throw null; } |
| 61 | + [System.Diagnostics.DebuggerStepThroughAttribute] |
| 62 | + public static System.Threading.Tasks.Task<TItem> GetOrCreateAsync<TItem>(this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key, System.Func<Microsoft.Extensions.Caching.Memory.ICacheEntry, System.Threading.Tasks.Task<TItem>> factory) { throw null; } |
| 63 | + public static TItem GetOrCreate<TItem>(this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key, System.Func<Microsoft.Extensions.Caching.Memory.ICacheEntry, TItem> factory) { throw null; } |
| 64 | + public static TItem Get<TItem>(this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key) { throw null; } |
| 65 | + public static TItem Set<TItem>(this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key, TItem value) { throw null; } |
| 66 | + public static TItem Set<TItem>(this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key, TItem value, Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options) { throw null; } |
| 67 | + public static TItem Set<TItem>(this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key, TItem value, Microsoft.Extensions.Primitives.IChangeToken expirationToken) { throw null; } |
| 68 | + public static TItem Set<TItem>(this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key, TItem value, System.DateTimeOffset absoluteExpiration) { throw null; } |
| 69 | + public static TItem Set<TItem>(this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key, TItem value, System.TimeSpan absoluteExpirationRelativeToNow) { throw null; } |
| 70 | + public static bool TryGetValue<TItem>(this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key, out TItem value) { throw null; } |
| 71 | + } |
| 72 | + public enum CacheItemPriority |
| 73 | + { |
| 74 | + Low = 0, |
| 75 | + Normal = 1, |
| 76 | + High = 2, |
| 77 | + NeverRemove = 3, |
| 78 | + } |
| 79 | + public enum EvictionReason |
| 80 | + { |
| 81 | + None = 0, |
| 82 | + Removed = 1, |
| 83 | + Replaced = 2, |
| 84 | + Expired = 3, |
| 85 | + TokenExpired = 4, |
| 86 | + Capacity = 5, |
| 87 | + } |
| 88 | + public partial interface ICacheEntry : System.IDisposable |
| 89 | + { |
| 90 | + System.DateTimeOffset? AbsoluteExpiration { get; set; } |
| 91 | + System.TimeSpan? AbsoluteExpirationRelativeToNow { get; set; } |
| 92 | + System.Collections.Generic.IList<Microsoft.Extensions.Primitives.IChangeToken> ExpirationTokens { get; } |
| 93 | + object Key { get; } |
| 94 | + System.Collections.Generic.IList<Microsoft.Extensions.Caching.Memory.PostEvictionCallbackRegistration> PostEvictionCallbacks { get; } |
| 95 | + Microsoft.Extensions.Caching.Memory.CacheItemPriority Priority { get; set; } |
| 96 | + long? Size { get; set; } |
| 97 | + System.TimeSpan? SlidingExpiration { get; set; } |
| 98 | + object Value { get; set; } |
| 99 | + } |
| 100 | + public partial interface IMemoryCache : System.IDisposable |
| 101 | + { |
| 102 | + Microsoft.Extensions.Caching.Memory.ICacheEntry CreateEntry(object key); |
| 103 | + void Remove(object key); |
| 104 | + bool TryGetValue(object key, out object value); |
| 105 | + } |
| 106 | + public static partial class MemoryCacheEntryExtensions |
| 107 | + { |
| 108 | + public static Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions AddExpirationToken(this Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options, Microsoft.Extensions.Primitives.IChangeToken expirationToken) { throw null; } |
| 109 | + public static Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions RegisterPostEvictionCallback(this Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options, Microsoft.Extensions.Caching.Memory.PostEvictionDelegate callback) { throw null; } |
| 110 | + public static Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions RegisterPostEvictionCallback(this Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options, Microsoft.Extensions.Caching.Memory.PostEvictionDelegate callback, object state) { throw null; } |
| 111 | + public static Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions SetAbsoluteExpiration(this Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options, System.DateTimeOffset absolute) { throw null; } |
| 112 | + public static Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions SetAbsoluteExpiration(this Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options, System.TimeSpan relative) { throw null; } |
| 113 | + public static Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions SetPriority(this Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options, Microsoft.Extensions.Caching.Memory.CacheItemPriority priority) { throw null; } |
| 114 | + public static Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions SetSize(this Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options, long size) { throw null; } |
| 115 | + public static Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions SetSlidingExpiration(this Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options, System.TimeSpan offset) { throw null; } |
| 116 | + } |
| 117 | + public partial class MemoryCacheEntryOptions |
| 118 | + { |
| 119 | + public MemoryCacheEntryOptions() { } |
| 120 | + public System.DateTimeOffset? AbsoluteExpiration { get { throw null; } set { } } |
| 121 | + public System.TimeSpan? AbsoluteExpirationRelativeToNow { get { throw null; } set { } } |
| 122 | + public System.Collections.Generic.IList<Microsoft.Extensions.Primitives.IChangeToken> ExpirationTokens { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } |
| 123 | + public System.Collections.Generic.IList<Microsoft.Extensions.Caching.Memory.PostEvictionCallbackRegistration> PostEvictionCallbacks { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } |
| 124 | + public Microsoft.Extensions.Caching.Memory.CacheItemPriority Priority { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } |
| 125 | + public long? Size { get { throw null; } set { } } |
| 126 | + public System.TimeSpan? SlidingExpiration { get { throw null; } set { } } |
| 127 | + } |
| 128 | + public partial class PostEvictionCallbackRegistration |
| 129 | + { |
| 130 | + public PostEvictionCallbackRegistration() { } |
| 131 | + public Microsoft.Extensions.Caching.Memory.PostEvictionDelegate EvictionCallback { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } |
| 132 | + public object State { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } |
| 133 | + } |
| 134 | + public delegate void PostEvictionDelegate(object key, object value, Microsoft.Extensions.Caching.Memory.EvictionReason reason, object state); |
| 135 | +} |
| 136 | +namespace Microsoft.Extensions.Internal |
| 137 | +{ |
| 138 | + public partial interface ISystemClock |
| 139 | + { |
| 140 | + System.DateTimeOffset UtcNow { get; } |
| 141 | + } |
| 142 | + public partial class SystemClock : Microsoft.Extensions.Internal.ISystemClock |
| 143 | + { |
| 144 | + public SystemClock() { } |
| 145 | + public System.DateTimeOffset UtcNow { get { throw null; } } |
| 146 | + } |
| 147 | +} |
0 commit comments