Exemplo n.º 1
0
        /// <summary>
        /// Führt die Kernfunktion des Exports aus und gibt bei erfolgreichen Export den kompletten Pfad aus. andernfalls null.
        /// </summary>
        /// <returns></returns>
        public string Export()
        {
            string file   = _setting.FullPath;
            string result = null;

            // restore path
            if (!string.IsNullOrEmpty(_setting.Location) &&
                !Directory.Exists(_setting.Location))
            {
                Directory.CreateDirectory(_setting.Location);
            }

            if (JsonIO.SaveToJson(_exportData, file, _setting.Binder))
            {
                result = file;
            }

            // done!
            Log.Info($"json export successfull for '{result}'");
            return(result);
        }