Constructor CustomMaterializationUnit
CustomMaterializationUnit(LazyEncodedString, MaterializationAction, ImmutableArray<KeyValuePair<SymbolStringPoolEntry, SymbolFlags>>, SymbolStringPoolEntry?)
Initializes a new instance of the CustomMaterializationUnit class.
public CustomMaterializationUnit(LazyEncodedString name, MaterializationAction materializeAction, ImmutableArray<KeyValuePair<SymbolStringPoolEntry, SymbolFlags>> symbols, SymbolStringPoolEntry? initSymbol = null)
Parameters
nameLazyEncodedStringName of this instance
materializeActionMaterializationActionAction to perform to materialize the symbol
symbolsImmutableArray<KeyValuePair<SymbolStringPoolEntry, SymbolFlags>>symbols the materializer works on
initSymbolSymbolStringPoolEntrySymbol of static initializer (if any)
CustomMaterializationUnit(LazyEncodedString, MaterializationAction, DiscardAction?, ImmutableArray<KeyValuePair<SymbolStringPoolEntry, SymbolFlags>>, SymbolStringPoolEntry?)
Initializes a new instance of the CustomMaterializationUnit class.
public CustomMaterializationUnit(LazyEncodedString name, MaterializationAction materializeAction, DiscardAction? discardAction, ImmutableArray<KeyValuePair<SymbolStringPoolEntry, SymbolFlags>> symbols, SymbolStringPoolEntry? initSymbol = null)
Parameters
nameLazyEncodedStringName of this instance
materializeActionMaterializationActionAction to perform to materialize the symbol
discardActionDiscardActionAction to perform when the JIT discards/replaces a symbol
symbolsImmutableArray<KeyValuePair<SymbolStringPoolEntry, SymbolFlags>>symbols the materializer works on
initSymbolSymbolStringPoolEntrySymbol of static initializer (if any)
Remarks
This implementation will maintain the lifetime of the provided delegates via an internally allocated disposable until the materialization is completed or abandoned. If is not called, then the is. This allows for cases where the data used by the is not held by the action itself or needs to support early disposal instead of remaining at the whims of the GC.
important
If is not null it MUST have MaterializationSideEffectsOnly set AND this implementation takes ownership of the ref count for this symbol (Move semantics). If callers want access to the string beyond this call they must increment the ref count before calling this function.