Class DataFeedBuildingBlockMonkey<TMonkey, TDataFeed>
- Namespace
- MonkeyLoader.Resonite.DataFeeds
- Assembly
- MonkeyLoader.Resonite.Integration.dll
Represents the base class for patchers that run after Resonite's assemblies have been loaded and that hook into the game's lifecycle.
Specifically, to add this class as a building block to an async
parametrized enumerable builder for a TDataFeed
's Enumerate method.
public abstract class DataFeedBuildingBlockMonkey<TMonkey, TDataFeed> : DataFeedBuilderMonkey<TMonkey, TDataFeed>, IResoniteMonkey, IMonkey, IRun, IShutdown, IComparable<IMonkey>, INestedIdentifiable<Mod>, INestedIdentifiable, IIdentifiable, IAuthorable, IAsyncParametrizedBuildingBlock<DataFeedItem, EnumerateDataFeedParameters<TDataFeed>>, IPrioritizable where TMonkey : DataFeedBuildingBlockMonkey<TMonkey, TDataFeed>, new() where TDataFeed : IDataFeed
Type Parameters
TMonkey
The type of the actual patcher.
TDataFeed
The FrooxEngine.IDataFeed to modify.
- Inheritance
-
MonkeyBase<TMonkey>Monkey<TMonkey>ResoniteMonkey<TMonkey>DataFeedBuilderMonkey<TMonkey, TDataFeed>DataFeedBuildingBlockMonkey<TMonkey, TDataFeed>
- Implements
- Inherited Members
- Extension Methods
Remarks
Game assemblies and their types can be directly referenced from these.
Contains useful overridable methods that are hooked to different points in the game's lifecycle.
Properties
Priority
Gets the priority of this item. Use an agreed standard as a base.
public abstract int Priority { get; }
Property Value
- int
An interger used to sort the prioritizable items.
Higher comes first with the default comparer.
Remarks
This is the priority with which this building block will be added to the data feed enumerate sequence builder.
Methods
AddBuildingBlocks(IAsyncParametrizedEnumerableBuilder<DataFeedItem, EnumerateDataFeedParameters<TDataFeed>>)
Called to add one or more async
parametrized building blocks to the async
parametrized enumerable builder for this TDataFeed
.
protected override sealed void AddBuildingBlocks(IAsyncParametrizedEnumerableBuilder<DataFeedItem, EnumerateDataFeedParameters<TDataFeed>> builder)
Parameters
builder
IAsyncParametrizedEnumerableBuilder<DataFeedItem, EnumerateDataFeedParameters<TDataFeed>>The enumerable builder to add one or more building blocks too.
Remarks
The default items of the FrooxEngine.IDataFeed.Enumerate() method are inserted at priority 0, unless disabled through the parameters.
Apply(IAsyncEnumerable<DataFeedItem>, EnumerateDataFeedParameters<TDataFeed>)
This method implements the transformation of the current
async sequence that this building block should apply for the
DataFeed.Enumerate call.
public abstract IAsyncEnumerable<DataFeedItem> Apply(IAsyncEnumerable<DataFeedItem> current, EnumerateDataFeedParameters<TDataFeed> parameters)
Parameters
current
IAsyncEnumerable<DataFeedItem>parameters
EnumerateDataFeedParameters<TDataFeed>
Returns
- IAsyncEnumerable<DataFeedItem>
Remarks
The default items of the FrooxEngine.IDataFeed.Enumerate() method are inserted first at priority 0, unless disabled through the parameters.