Table of Contents

Class Serialization

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.

[PublicApi]
[VisualQuery(NiceName = "Serialization Configuration", UiHint = "Determine how this data is Serialized", Icon = "settings_ethernet", Type = DataSourceType.Modify, NameId = "2952e680-4aaa-4a12-adf7-325cb2854358", DynamicOut = true, In = new string[] { "Default" }, ConfigurationType = "5c84cd3f-f853-40b3-81cf-dee6a07dc411", HelpLink = "https://go.2sxc.org/DsSerializationConfiguration")]
public class Serialization : DataSourceBase, IDataSource, IAppIdentity, IZoneIdentity, IAppIdentityLight, ICacheKey, ICacheExpiring, ITimestamped, IHasLog, IDataSourceLinkable
Inheritance
Serialization
Implements
Inherited Members

Remarks

Had a major, breaking update in v15. Consult the guide to upgrade your custom data sources.

Properties

DropFalseValues

todo

[Configuration(Field = "RemoveFalseValues")]
public string DropFalseValues { get; }

Property Value

string

IncludeAppId

Should the AppId be included in serialization. Especially for scenarios where data is retrieved from multiple Apps

[Configuration]
public string IncludeAppId { get; }

Property Value

string

IncludeCreated

Should the Created date be included in serialization

[Configuration]
public string IncludeCreated { get; }

Property Value

string

IncludeGuid

Should the GUID be included in serialization

[Configuration]
public string IncludeGuid { get; }

Property Value

string

IncludeId

Should the ID be included in serialization

[Configuration]
public string IncludeId { get; }

Property Value

string

IncludeMetadata

Should the Metadata ID be included in serialization

[Configuration]
public string IncludeMetadata { get; }

Property Value

string

IncludeMetadataFor

Should the Metadata target/for information be included in serialization

[Configuration]
public string IncludeMetadataFor { get; }

Property Value

string

IncludeMetadataForId

Should the Metadata target/for information be included in serialization

[Configuration]
public string IncludeMetadataForId { get; }

Property Value

string

IncludeMetadataForType

Should the Metadata target/for information be included in serialization

[Configuration]
public string IncludeMetadataForType { get; }

Property Value

string

IncludeMetadataGuid

Should the Metadata GUID be included in serialization

[Configuration]
public string IncludeMetadataGuid { get; }

Property Value

string

IncludeMetadataId

Should the Metadata ID be included in serialization

[Configuration]
public string IncludeMetadataId { get; }

Property Value

string

IncludeMetadataTitle

Should the default Title of the Metadata be included as "Title" in serialization

[Configuration]
public string IncludeMetadataTitle { get; }

Property Value

string

IncludeModified

Should the Modified date be included in serialization

[Configuration]
public string IncludeModified { get; }

Property Value

string

IncludeRelationshipGuid

Should the Relationship GUID be included in serialization

[Configuration]
public string IncludeRelationshipGuid { get; }

Property Value

string

IncludeRelationshipId

Should the Relationship ID be included in serialization

[Configuration]
public string IncludeRelationshipId { get; }

Property Value

string

IncludeRelationshipTitle

Should the default Title of the Relationship be included as "Title" in serialization

[Configuration]
public string IncludeRelationshipTitle { get; }

Property Value

string

IncludeRelationships

Should the Relationships be included in serialization

[Configuration]
public string IncludeRelationships { get; }

Property Value

string

IncludeRelationshipsAsCsv

Should the Relationships be included as CSV like "42,27,999". Default is false in which case they are sub-objects.

[Configuration(Fallback = false)]
public string IncludeRelationshipsAsCsv { get; }

Property Value

string

Remarks

WIP / adding in v15.03

IncludeTitle

Should the default Title be included as "Title" in serialization

[Configuration]
public string IncludeTitle { get; }

Property Value

string

IncludeZoneId

Should the AppId be included in serialization. Especially for scenarios where data is retrieved from multiple Apps

[Configuration]
public string IncludeZoneId { get; }

Property Value

string

Out

Gets the Dictionary of Out-Streams. This is the internal accessor, as usually you'll use this["name"] instead.
In rare cases you need the Out, for example to list the stream names in the data source.

public override IReadOnlyDictionary<string, IDataStream> Out { get; }

Property Value

IReadOnlyDictionary<string, IDataStream>

A dictionary of named IDataStream objects, case insensitive

RemoveEmptyStrings

todo

[Configuration(Field = "RemoveEmptyStringValues")]
public string RemoveEmptyStrings { get; }

Property Value

string

RemoveNullValues

todo

[Configuration]
public string RemoveNullValues { get; }

Property Value

string

RemoveZeroValues

todo

[Configuration]
public string RemoveZeroValues { get; }

Property Value

string