TranslationService Class
Assembly: PTS.Modules.Translations.dll
Syntax
public class TranslationService : SingleRepositoryService<Translation>, IServiceProviderAccessor, ITranslationService, ISeedWork<ITranslationService>, ISeedWork
Inheritance
System.Object
TranslationService
Constructors
TranslationService(IUnitOfWork)
Declaration
public TranslationService(IUnitOfWork unitOfWork)
Parameters
Methods
Entity<TEntity>(LanguageCode, TEntity)
Declaration
public virtual TranslatedEntity<TEntity> Entity<TEntity>(LanguageCode language, TEntity entity)
where TEntity : IHasGuid
Parameters
Returns
Type Parameters
EntityAsync<TEntity>(LanguageCode, TEntity)
Declaration
public virtual Task<TranslatedEntity<TEntity>> EntityAsync<TEntity>(LanguageCode language, TEntity entity)
where TEntity : IHasGuid
Parameters
Returns
Type Parameters
GetTranslation<TEntity>(LanguageCode, TEntity, Expression<Func<TEntity, String>>)
Declaration
public virtual Translation GetTranslation<TEntity>(LanguageCode language, TEntity entity, Expression<Func<TEntity, string>> property)
where TEntity : IHasGuid
Parameters
Type |
Name |
Description |
LanguageCode |
language |
|
TEntity |
entity |
|
System.Linq.Expressions.Expression<System.Func<TEntity, System.String>> |
property |
|
Returns
Type Parameters
GetTranslationAsync<TEntity>(LanguageCode, TEntity, Expression<Func<TEntity, String>>)
Declaration
public virtual Task<Translation> GetTranslationAsync<TEntity>(LanguageCode language, TEntity entity, Expression<Func<TEntity, string>> property)
where TEntity : IHasGuid
Parameters
Type |
Name |
Description |
LanguageCode |
language |
|
TEntity |
entity |
|
System.Linq.Expressions.Expression<System.Func<TEntity, System.String>> |
property |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<Translation> |
|
Type Parameters
Property<TEntity>(LanguageCode, TEntity, Expression<Func<TEntity, String>>)
Declaration
public virtual string Property<TEntity>(LanguageCode language, TEntity entity, Expression<Func<TEntity, string>> property)
where TEntity : IHasGuid
Parameters
Type |
Name |
Description |
LanguageCode |
language |
|
TEntity |
entity |
|
System.Linq.Expressions.Expression<System.Func<TEntity, System.String>> |
property |
|
Returns
Type |
Description |
System.String |
|
Type Parameters
PropertyAsync<TEntity>(LanguageCode, TEntity, Expression<Func<TEntity, String>>)
Declaration
public virtual Task<string> PropertyAsync<TEntity>(LanguageCode language, TEntity entity, Expression<Func<TEntity, string>> property)
where TEntity : IHasGuid
Parameters
Type |
Name |
Description |
LanguageCode |
language |
|
TEntity |
entity |
|
System.Linq.Expressions.Expression<System.Func<TEntity, System.String>> |
property |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.String> |
|
Type Parameters
SetEntity<TEntity>(TranslatedEntity<TEntity>)
Declaration
public virtual void SetEntity<TEntity>(TranslatedEntity<TEntity> translated)
where TEntity : IHasGuid
Parameters
Type Parameters
SetProperty<TEntity>(LanguageCode, TEntity, Expression<Func<TEntity, String>>, String)
Declaration
public virtual Translation SetProperty<TEntity>(LanguageCode language, TEntity entity, Expression<Func<TEntity, string>> property, string value)
where TEntity : IHasGuid
Parameters
Type |
Name |
Description |
LanguageCode |
language |
|
TEntity |
entity |
|
System.Linq.Expressions.Expression<System.Func<TEntity, System.String>> |
property |
|
System.String |
value |
|
Returns
Type Parameters
SetTranslationAsync<TEntity>(LanguageCode, TEntity, Expression<Func<TEntity, String>>, String)
Declaration
public virtual Task<Translation> SetTranslationAsync<TEntity>(LanguageCode language, TEntity entity, Expression<Func<TEntity, string>> property, string value)
where TEntity : IHasGuid
Parameters
Type |
Name |
Description |
LanguageCode |
language |
|
TEntity |
entity |
|
System.Linq.Expressions.Expression<System.Func<TEntity, System.String>> |
property |
|
System.String |
value |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<Translation> |
|
Type Parameters
SetTranslationAsync<TEntity>(TranslatedEntity<TEntity>)
Declaration
public virtual Task SetTranslationAsync<TEntity>(TranslatedEntity<TEntity> translated)
where TEntity : IHasGuid
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Type Parameters
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Extension Methods