Class StreamPick
- Namespace
- ToSic.Eav.DataSources
- Assembly
- ToSic.Eav.DataSources.dll
The base class for all DataSources, especially custom DataSources. It must always be inherited. It provides a lot of core functionality to get configurations, ensure caching and more.
Important: in most cases you will inherit the CustomDataSource DataSource for custom data sources.
The StreamPick DataSource is part of the Standard EAV Data Sources. It will pick a stream from In and pass that on to Out.
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:
In this screenshot you can see:
- The DataSource which we are configuring
- The stream called
True
- The stream called
False
- The configuration which will resolve a token to
True
orFalse
and thereby pick the stream
Programming With The StreamPick 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 / 2sxc 10.26
API Documentation
[PublicApi]
[VisualQuery(NiceName = "Pick Stream", UiHint = "Choose a stream", Icon = "call_merge", Type = DataSourceType.Logic, NameId = "ToSic.Eav.DataSources.StreamPick, ToSic.Eav.DataSources", ConfigurationType = "67b19864-df6d-400b-9f37-f41f1dd69c4a", DynamicOut = false, DynamicIn = true, HelpLink = "https://go.2sxc.org/DsStreamPick")]
public sealed class StreamPick : DataSourceBase, IDataSource, IAppIdentity, IZoneIdentity, IAppIdentityLight, ICacheKey, ICacheExpiring, ITimestamped, IHasLog, IDataSourceLinkable
- Inheritance
-
objectServiceBaseStreamPick
- Implements
- Inherited Members
Remarks
Had a major, breaking update in v15. Consult the guide to upgrade your custom data sources.
Properties
StreamName
The stream name to lookup.
[Configuration(Fallback = "Default")]
public string StreamName { get; set; }