protected override void Exported(ExportContentContext context, TPart instance) { if (OnExported != null) { OnExported(context, instance); } }
void IContentHandler.Exported(ExportContentContext context) { foreach (var filter in Filters.OfType <IContentStorageFilter>()) { filter.Exported(context); } Exported(context); }
public void Export(dynamic state, ExportContentContext context) { string termIds = Convert.ToString(state.TermIds); if (!String.IsNullOrEmpty(termIds)) { var ids = termIds.Split(new[] {','}).Select(Int32.Parse).ToArray(); var terms = ids.Select(_optionSetService.GetOptionItem).ToList(); var identities = terms.Select(context.ContentManager.GetItemMetadata).Select(x => x.Identity.ToString()).ToArray(); state.TermIds = String.Join(",", identities); } }
public dynamic Describe(IContent content) { var x = new XElement("Content"); var context = new ExportContentContext(content.ContentItem,x); foreach (var driver in _contentPartDrivers) { driver.Exporting(context); } var stuff = new Stuff(x); return stuff; // Well that was easy // TODO: There is sensitive data we want to be able to exclude }
private void ExportRouteSettings(ExportContentContext context, CacheSettingsPart part) { var routes = _cacheService.GetRouteConfigs(); var routesElement = new XElement("Routes", routes.Select(x => new XElement("Route") .Attr("Key", x.RouteKey) .Attr("Url", x.Url) .Attr("Priority", x.Priority) .Attr("Duration", x.Duration) .Attr("GraceTime", x.GraceTime) .Attr("MaxAge", x.MaxAge) .Attr("FeatureName", x.FeatureName))); context.Element(part.PartDefinition.Name).Add(routesElement); }
public string Export(string formName, string state, ExportContentContext exportContext) { var describeContext = new DescribeContext(); foreach (var provider in _formProviders) { provider.Describe(describeContext); } var descriptor = describeContext.Describe().FirstOrDefault(x => x.Name == formName); if (descriptor == null || descriptor.Export == null) { return state; } var dynamicState = FormParametersHelper.ToDynamic(state); descriptor.Export(dynamicState, exportContext); return FormParametersHelper.ToString(dynamicState); }
public override void Exported(ExportContentContext context) { foreach (var contentPartDriver in _drivers) { contentPartDriver.Exported(context); } }
public override void Exported(ExportContentContext context) { foreach (var contentPartDriver in _drivers.OrderBy(x => x.GetPartInfo().First().PartName)) { contentPartDriver.Exported(context); } }
public override void Exported(ExportContentContext context) { context.Logger = Logger; foreach (var contentFieldDriver in _drivers) { contentFieldDriver.Exported(context); } }
protected override void Exported(ExportContentContext context) { if (context.ContentItem == _ignoreExportHandlerFor) return; RecordAuditTrailEvent(ContentAuditTrailEventProvider.Exported, context.ContentItem); }
void IContentHandler.Exported(ExportContentContext context) { Exported(context); }
protected virtual void Exported(ExportContentContext context) { }
void IContentHandler.Exporting(ExportContentContext context) { Exporting(context); }
public override void Exporting(ExportContentContext context) { foreach (var contentFieldDriver in _drivers) { contentFieldDriver.Exporting(context); } }
public override void Exporting(ExportContentContext context) { context.Logger = Logger; foreach (var contentFieldDriver in _drivers.OrderBy(x => x.GetFieldInfo().First().FieldTypeName)) { contentFieldDriver.Exporting(context); } }
public void Exporting(ExportContentContext context) { }
public void Exported(ExportContentContext context) { }