Interface IConvertToEavLight
Helper / Service to prepare Entities, Streams and DataSources to ToSic.Eav.DataFormats.EavLight for automatic serialization in WebApis.
It can prepare single items like IEntity and IEntityWrapper like DynamicEntities.
It can also prepare IEnumerable/List of these types, as well as DataStream and DataSource objects.
In Custom Code / Razor / WebApi you can get this service with Dependency Injection like
var converter = GetService<IConvertToEavLight>();
Assembly: ToSic.Eav.WebApi.dll
[PublicApi]
public interface IConvertToEavLight : IConvertEntity<EavLightEntity>, IConvert<IEntity, EavLightEntity>, IConvert<IEntityWrapper, EavLightEntity>, IConvert<object, EavLightEntity>, IConvertDataSource<EavLightEntity>, IHasLog
Methods
|
Improve this Doc
View Source
Declaration
IEnumerable<EavLightEntity> Convert(IEnumerable<object> list)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.Object> |
list |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<EavLightEntity> |
|
|
Improve this Doc
View Source
Declaration
IEnumerable<EavLightEntity> Convert(IEnumerable<IEntity> entities)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<IEntity> |
entities |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<EavLightEntity> |
|
|
Improve this Doc
View Source
Declaration
IEnumerable<EavLightEntity> Convert(IEnumerable<IEntityWrapper> list)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<IEntityWrapper> |
list |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<EavLightEntity> |
|
|
Improve this Doc
View Source
Declaration
EavLightEntity Convert(object item)
Parameters
Type |
Name |
Description |
System.Object |
item |
|
Returns
|
Improve this Doc
View Source
Declaration
EavLightEntity Convert(IEntity entity)
Parameters
Type |
Name |
Description |
IEntity |
entity |
|
Returns
|
Improve this Doc
View Source
Declaration
EavLightEntity Convert(IEntityWrapper item)
Parameters
Returns
|
Improve this Doc
View Source
Declaration
IDictionary<string, IEnumerable<EavLightEntity>> Convert(IDataSource source, IEnumerable<string> streams = null)
Parameters
Type |
Name |
Description |
IDataSource |
source |
|
System.Collections.Generic.IEnumerable<System.String> |
streams |
|
Returns
Type |
Description |
System.Collections.Generic.IDictionary<System.String, System.Collections.Generic.IEnumerable<EavLightEntity>> |
|
|
Improve this Doc
View Source
Declaration
IDictionary<string, IEnumerable<EavLightEntity>> Convert(IDataSource source, IEnumerable<string> streams, string[] filterGuids)
Parameters
Type |
Name |
Description |
IDataSource |
source |
|
System.Collections.Generic.IEnumerable<System.String> |
streams |
|
System.String[] |
filterGuids |
|
Returns
Type |
Description |
System.Collections.Generic.IDictionary<System.String, System.Collections.Generic.IEnumerable<EavLightEntity>> |
|
|
Improve this Doc
View Source
Declaration
IDictionary<string, IEnumerable<EavLightEntity>> Convert(IDataSource source, string streams)
Parameters
Type |
Name |
Description |
IDataSource |
source |
|
System.String |
streams |
|
Returns
Type |
Description |
System.Collections.Generic.IDictionary<System.String, System.Collections.Generic.IEnumerable<EavLightEntity>> |
|