This repository was archived by the owner on Dec 14, 2018. It is now read-only.
File tree 5 files changed +19
-19
lines changed
Microsoft.Framework.Caching.Interfaces
Microsoft.Framework.Caching.Memory
5 files changed +19
-19
lines changed Original file line number Diff line number Diff line change 9
9
"System.Runtime" : " 4.0.20-beta-*"
10
10
}
11
11
},
12
- "netcore451 " : {
12
+ ".NETPortable,Version=v4.5,Profile=Profile7 " : {
13
13
"frameworkAssemblies" : {
14
14
"System.Runtime" : " "
15
15
}
Original file line number Diff line number Diff line change 4
4
using System ;
5
5
using System . Collections . Generic ;
6
6
using System . Threading ;
7
- #if NETCORE451
7
+ #if ! NET45 && ! DNX451 && ! DNXCORE50
8
8
using System . Threading . Tasks ;
9
9
#endif
10
10
@@ -17,7 +17,7 @@ internal class CacheEntry
17
17
private static readonly Action < object > ExpirationCallback = TriggerExpired ;
18
18
19
19
private readonly Action < CacheEntry > _notifyCacheOfExpiration ;
20
-
20
+
21
21
internal CacheEntry ( CacheSetContext context , object value , Action < CacheEntry > notifyCacheOfExpiration )
22
22
{
23
23
Context = context ;
@@ -141,10 +141,10 @@ internal void InvokeEvictionCallbacks()
141
141
Context . PostEvictionCallbacks = null ;
142
142
if ( callbacks != null )
143
143
{
144
- #if NETCORE451
145
- Task . Run ( ( ) => InvokeCallbacks ( callbacks ) ) ;
146
- #else
144
+ #if NET45 || DNX451 || DNXCORE50
147
145
ThreadPool . QueueUserWorkItem ( InvokeCallbacks , callbacks ) ;
146
+ #else
147
+ Task . Run ( ( ) => InvokeCallbacks ( callbacks ) ) ;
148
148
#endif
149
149
}
150
150
}
Original file line number Diff line number Diff line change 4
4
using System ;
5
5
#if DNXCORE50
6
6
using System . Threading ;
7
- #elif ! NETCORE451
7
+ #elif NET45 || DNX451 || DNXCORE50
8
8
using System . Runtime . Remoting ;
9
9
using System . Runtime . Remoting . Messaging ;
10
10
#endif
@@ -21,13 +21,7 @@ public static IEntryLink ContextLink
21
21
get { return _contextLink . Value ; }
22
22
set { _contextLink . Value = value ; }
23
23
}
24
- #elif NETCORE451
25
- public static IEntryLink ContextLink
26
- {
27
- get { return null ; }
28
- set { throw new NotImplementedException ( ) ; }
29
- }
30
- #else
24
+ #elif NET45 || DNX451
31
25
private const string ContextLinkDataName = "klr.host.EntryLinkHelpers.ContextLink" ;
32
26
33
27
public static IEntryLink ContextLink
@@ -48,6 +42,12 @@ public static IEntryLink ContextLink
48
42
CallContext . LogicalSetData ( ContextLinkDataName , new ObjectHandle ( value ) ) ;
49
43
}
50
44
}
45
+ #else
46
+ public static IEntryLink ContextLink
47
+ {
48
+ get { return null ; }
49
+ set { throw new NotImplementedException ( ) ; }
50
+ }
51
51
#endif
52
52
public static IDisposable FlowContext ( this IEntryLink link )
53
53
{
Original file line number Diff line number Diff line change 8
8
using Microsoft . Framework . Caching . Memory . Infrastructure ;
9
9
using Microsoft . Framework . Internal ;
10
10
using Microsoft . Framework . OptionsModel ;
11
- #if NETCORE451
11
+ #if ! NET45 && ! DNX451 && ! DNXCORE50
12
12
using System . Threading . Tasks ;
13
13
#endif
14
14
@@ -263,10 +263,10 @@ private void StartScanForExpiredItems()
263
263
if ( _expirationScanFrequency < now - _lastExpirationScan )
264
264
{
265
265
_lastExpirationScan = now ;
266
- #if NETCORE451
267
- Task . Run ( ( ) => ScanForExpiredItems ( state : null ) ) ;
268
- #else
266
+ #if NET45 || DNX451 || DNXCORE50
269
267
ThreadPool . QueueUserWorkItem ( ScanForExpiredItems ) ;
268
+ #else
269
+ Task . Run ( ( ) => ScanForExpiredItems ( state : null ) ) ;
270
270
#endif
271
271
}
272
272
}
Original file line number Diff line number Diff line change 15
15
"System.Threading.ThreadPool" : " 4.0.10-beta-*"
16
16
}
17
17
},
18
- "netcore451 " : {
18
+ ".NETPortable,Version=v4.5,Profile=Profile7 " : {
19
19
"frameworkAssemblies" : {
20
20
"System.Threading.Tasks" : " "
21
21
}
You can’t perform that action at this time.
0 commit comments