internal static string ExtractValue(MetaDataCollection metaData, string variableName) { if (variableName == null) { return(null); } Config config = ConfigManager.GetConfigManager().ConnectorConfig; if (variableName.StartsWith(config.EntityIdentifier)) { return(ExtractValueFromEntityTxt(variableName[config.EntityIdentifier.Length..], metaData.Entity));
internal static void ExtractAssets(MetaDataCollection metaData, out string[] childrenIds, out string[] attachementNames) { Config config = ConfigManager.GetConfigManager().ConnectorConfig; s_log.Debug("Analysiere alle Kindselemente."); JToken assets = metaData.Entity?[config.AssetsIdentifier]; if (assets == null) { childrenIds = Array.Empty <string>(); attachementNames = Array.Empty <string>(); return; } childrenIds = (from JToken asset in assets where asset[config.AutostartIdentifier]?.Value <bool>() != true && asset[config.UidFieldName]?.Value <string>() != null select asset[config.UidFieldName].Value <string>()).ToArray(); attachementNames = (from JToken asset in assets where asset[config.TypeIdentifier]?.Value <string>() == config.DocuIdentifier && asset[config.FileNameIdentifier]?.Value <string>() != null select asset[config.FileNameIdentifier].Value <string>()).ToArray(); }