Class StreamMerge
A DataSource that merges all streams on the In
into one Out
stream
The StreamMerge DataSource is part of the Standard EAV Data Sources. It will create a new stream containing everything which came into this data source.
How to use with the VisualQuery
When using the VisualQuery you can just drag it into your query. This is what it usually looks like:
The above example shows two filters finding items and delivering them on the same stream.
Example Using ItemFilterDuplicates
A common scenario will also combine this using the ItemFilterDuplicates, in case various in-streams deliver the same item:
No Settings
The StreamMerge DataSource has no settings to configure.
Note that it will automatically merge the streams in A-Z order of the In-Stream names.
Programming With The StreamMerge DataSource
We recommend to use the VisualQuery where possible, as it's easier to understand and is identical for C# and JavaScript. It's also better because it separates data-retrieval from visualization.
Read also
Demo App and further links
You should find some examples in this demo App
History
- Introduced in EAV 4.x, 2sxc 9.10
API Documentation
Inheritance
Implements
Inherited Members
Namespace: ToSic.Eav.DataSources
Assembly: ToSic.Eav.DataSources.dll
Syntax
[PublicApi_Stable_ForUseInYourCode]
[VisualQuery(NiceName = "Merge Streams", UiHint = "Combine multiple streams into one", Icon = "merge_type", Type = DataSourceType.Logic, NameId = "ToSic.Eav.DataSources.StreamMerge, ToSic.Eav.DataSources", DynamicOut = false, DynamicIn = true, HelpLink = "https://r.2sxc.org/DsStreamMerge")]
public sealed class StreamMerge : DataSourceBase, IDataSource, IAppIdentity, IZoneIdentity, IAppIdentityLight, ICacheInfo, ICacheKey, ICacheExpiring, ITimestamped, ICanPurgeListCache, IHasLog, IDataTarget, IAppIdentitySync, IDataSourceLinkable
Remarks
History
- v12.10 added new Out streams
Distinct
removes duplicates,And
keeps items which are in all streams andXor
keeps items which are only in one stream