◆ PopulateCache< T >() [1/2]
static T pluginbase.Objects.World.BlockCacheExtension.PopulateCache< T > |
( |
this IBlockLookup |
lookup, |
|
|
T |
cache |
|
) |
| |
|
static |
15 var fields = typeof(T).GetFields(BINDING);
17 foreach(var field
in fields)
19 var attr = field.GetCustomAttributes(typeof(BlockCacheAttribute),
true)
20 .Cast<BlockCacheAttribute>().FirstOrDefault();
24 if (!
string.IsNullOrEmpty(attr.Name))
27 field.SetValue( cache, lookup.SlowGetBlock(attr.Name) );
32 field.SetValue( cache, lookup.SlowGetBlock(attr.Type) );
38 field.SetValue( cache, lookup.SlowGetBlock(field.FieldType) );
◆ PopulateCache< T >() [2/2]
static T pluginbase.Objects.World.BlockCacheExtension.PopulateCache< T > |
( |
this IBlockLookup |
lookup | ) |
|
|
static |
static T PopulateCache< T >(this IBlockLookup lookup, T cache)
Definition: BlockCacheExtension.cs:11
The documentation for this class was generated from the following file: