async Task IContentLocalizationPartHandler.LocalizingAsync(LocalizationContentContext context, ContentPart part)
 {
     if (part is TPart tpart)
     {
         await LocalizingAsync(context, tpart);
     }
 }
        public override async Task LocalizedAsync(LocalizationContentContext context)
        {
            var contentTypeDefinition = _contentDefinitionManager.GetTypeDefinition(context.ContentItem.ContentType);

            if (contentTypeDefinition == null)
            {
                return;
            }

            foreach (var typePartDefinition in contentTypeDefinition.Parts)
            {
                var partName  = typePartDefinition.PartDefinition.Name;
                var activator = _contentPartFactory.GetTypeActivator(partName);
                var part      = context.ContentItem.Get(activator.Type, typePartDefinition.Name) as ContentPart;

                if (part != null)
                {
                    await _partHandlers.InvokeAsync(handler => handler.LocalizedAsync(context, part), _logger);
                }
            }
        }
 public virtual Task LocalizedAsync(LocalizationContentContext context)
 {
     return(Task.CompletedTask);
 }
 public virtual Task LocalizedAsync(LocalizationContentContext context, TPart part) => Task.CompletedTask;