C# Класс ToSic.SexyContent.ImportExport.XmlImport

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
ImportLog List

Private Properties

Свойство Тип Описание
GetImportAttributeSets List
GetImportEntities List
GetImportEntity ToSic.Eav.Import.ImportEntity
GetMappedLink string
ImportXmlTemplates void
PrepareFileIdCorrectionList void
PrepareFolderIdCorrectionListAndCreateMissingFolders void

Открытые методы

Метод Описание
GetExportImportMessagesFromImportLog ( List importLog ) : IEnumerable

Maps EAV import messages to 2sxc import messages

ImportApp ( int zoneId, System.Xml.Linq.XDocument doc, int &appId ) : bool

Creates an app and then imports the xml

ImportXml ( int zoneId, int appId, System.Xml.Linq.XDocument doc, bool leaveExistingValuesUntouched = true ) : bool

Do the import

IsCompatible ( System.Xml.Linq.XDocument doc ) : bool
XmlImport ( string defaultLanguage, string userName, bool allowSystemChanges = false ) : System

Create a new xmlImport instance

Приватные методы

Метод Описание
GetImportAttributeSets ( IEnumerable xAttributeSets ) : List
GetImportEntities ( IEnumerable entities, int assignmentObjectTypeId ) : List

Returns a collection of EAV import entities

GetImportEntity ( System.Xml.Linq.XElement entityNode, int assignmentObjectTypeId ) : ToSic.Eav.Import.ImportEntity

Returns an EAV import entity

GetMappedLink ( string sourceValueString ) : string

Try to map a link like "file:275" from the import to the target system Will return null if nothing appropriate found, so the caller can choose to not do anything

ImportXmlTemplates ( System.Xml.Linq.XElement root ) : void
PrepareFileIdCorrectionList ( System.Xml.Linq.XElement sexyContentNode ) : void
PrepareFolderIdCorrectionListAndCreateMissingFolders ( System.Xml.Linq.XElement sexyContentNode ) : void

Описание методов

GetExportImportMessagesFromImportLog() публичный Метод

Maps EAV import messages to 2sxc import messages
public GetExportImportMessagesFromImportLog ( List importLog ) : IEnumerable
importLog List
Результат IEnumerable

ImportApp() публичный Метод

Creates an app and then imports the xml
public ImportApp ( int zoneId, System.Xml.Linq.XDocument doc, int &appId ) : bool
zoneId int
doc System.Xml.Linq.XDocument
appId int
Результат bool

ImportXml() публичный Метод

Do the import
public ImportXml ( int zoneId, int appId, System.Xml.Linq.XDocument doc, bool leaveExistingValuesUntouched = true ) : bool
zoneId int
appId int
doc System.Xml.Linq.XDocument
leaveExistingValuesUntouched bool
Результат bool

IsCompatible() публичный Метод

public IsCompatible ( System.Xml.Linq.XDocument doc ) : bool
doc System.Xml.Linq.XDocument
Результат bool

XmlImport() публичный Метод

Create a new xmlImport instance
public XmlImport ( string defaultLanguage, string userName, bool allowSystemChanges = false ) : System
defaultLanguage string The portals default language / culture - example: de-DE
userName string
allowSystemChanges bool Specify if the import should be able to change system-wide things like shared attributesets
Результат System

Описание свойств

ImportLog публичное свойство

public List ImportLog
Результат List