|
Enhanced C#
Language of your choice: library documentation
|
Contains global functions of Loyc.Collections that don't belong in any specific class. More...
Contains global functions of Loyc.Collections that don't belong in any specific class.
Public static fields | |
| static SimpleCache< object > | _objectCache |
Properties | |
| static SimpleCache< object >?? | ObjectCache [get] |
| Gets the cache used by Cache(object). More... | |
Static Public Member Functions | |
| static object | Cache (object o) |
| Passes the object through a thread-static instance of SimpleCache<o>. More... | |
| static object | Cache (int num) |
If the specified number is in the range -3 to 9 inclusive, an equivalent preallocated boxed integer is returned, otherwise the other overload, Cache(object), is invoked to handle the request. More... | |
| static object | Cache (char o) |
| Special overload to avoid treating argument as int32 in C#. More... | |
| static object | Cache (byte o) |
| Special overload to avoid treating argument as int32 in C#. More... | |
| static object | Cache (sbyte o) |
| Special overload to avoid treating argument as int32 in C#. More... | |
| static object | Cache (short o) |
| Special overload to avoid treating argument as int32 in C#. More... | |
| static object | Cache (ushort o) |
| Special overload to avoid treating argument as int32 in C#. More... | |
| static object | Cache (bool value) |
| Returns G.BoxedTrue or G.BoxedFalse depending on the parameter. More... | |
|
inlinestatic |
Returns G.BoxedTrue or G.BoxedFalse depending on the parameter.
References Loyc.G.BoxedFalse, and Loyc.G.BoxedTrue.
|
inlinestatic |
Special overload to avoid treating argument as int32 in C#.
References Loyc.Collections.CG.Cache().
Referenced by Loyc.Collections.CG.Cache().
|
inlinestatic |
Special overload to avoid treating argument as int32 in C#.
References Loyc.Collections.CG.Cache().
Referenced by Loyc.Collections.CG.Cache().
|
inlinestatic |
If the specified number is in the range -3 to 9 inclusive, an equivalent preallocated boxed integer is returned, otherwise the other overload, Cache(object), is invoked to handle the request.
| num | An integer you want to box. |
References Loyc.Collections.CG.Cache().
|
inlinestatic |
Passes the object through a thread-static instance of SimpleCache<o>.
If o is a string, an alternative to Caching is interning (String.Intern("...")). The latter tends to be more dangerous because an interned string can never be garbage-collected.
Note that SimpleCache<T> contains strong references to cached items, and the maximum cache size is 1024 items. The references are released when the current thread terminates or when you call ObjectCache.Clear().
References Loyc.Collections.CG.ObjectCache.
Referenced by Loyc.Collections.CG.Cache().
|
inlinestatic |
Special overload to avoid treating argument as int32 in C#.
References Loyc.Collections.CG.Cache().
Referenced by Loyc.Collections.CG.Cache().
|
inlinestatic |
Special overload to avoid treating argument as int32 in C#.
References Loyc.Collections.CG.Cache().
Referenced by Loyc.Collections.CG.Cache().
|
inlinestatic |
Special overload to avoid treating argument as int32 in C#.
References Loyc.Collections.CG.Cache().
Referenced by Loyc.Collections.CG.Cache().
|
staticget |
Gets the cache used by Cache(object).
Referenced by Loyc.Collections.CG.Cache().
1.8.17