mirror of https://github.com/abpframework/abp.git
6 changed files with 80 additions and 0 deletions
@ -0,0 +1,14 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.CmsKit.Domain.Shared.Volo.CmsKit.Contents; |
||||
|
|
||||
|
namespace Volo.CmsKit.Common.Application.Contracts.Volo.CmsKit.Contents |
||||
|
{ |
||||
|
public interface IContentRenderer |
||||
|
{ |
||||
|
Task<string> RenderAsync(string content); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,15 @@ |
|||||
|
using System; |
||||
|
using System.Collections; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.CmsKit.Domain.Shared.Volo.CmsKit.Contents; |
||||
|
|
||||
|
namespace Volo.CmsKit.Common.Application.Contracts.Volo.CmsKit.Contents |
||||
|
{ |
||||
|
public interface IContentRendererProvider |
||||
|
{ |
||||
|
Task<IContentRenderer> GetContentRendererAsync(IEntityContent content); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,19 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
using Volo.CmsKit.Common.Application.Contracts.Volo.CmsKit.Contents; |
||||
|
using Volo.CmsKit.Domain.Shared.Volo.CmsKit.Contents; |
||||
|
|
||||
|
namespace Volo.CmsKit.Common.Application.Volo.CmsKit.Contents |
||||
|
{ |
||||
|
public class PlainTextRenderer : IContentRenderer, ITransientDependency |
||||
|
{ |
||||
|
public Task<string> RenderAsync(IContent content) |
||||
|
{ |
||||
|
return Task.FromResult(content?.Value); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
namespace Volo.CmsKit.Domain.Shared.Volo.CmsKit.Contents |
||||
|
{ |
||||
|
public interface IContent |
||||
|
{ |
||||
|
string Value { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,8 @@ |
|||||
|
namespace Volo.CmsKit.Domain.Shared.Volo.CmsKit.Contents |
||||
|
{ |
||||
|
public interface IEntityContent : IContent |
||||
|
{ |
||||
|
string EntityType { get; set; } |
||||
|
string EntityId { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,17 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
using Volo.CmsKit.Domain.Shared.Volo.CmsKit.Contents; |
||||
|
|
||||
|
namespace Volo.CmsKit.Domain.Volo.CmsKit.Contents |
||||
|
{ |
||||
|
public class Content : FullAuditedAggregateRoot<Guid> |
||||
|
{ |
||||
|
public string Value { get; set; } |
||||
|
public string EntityType { get; set; } |
||||
|
public string EntityId { get; set; } |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue