Adf.Business.Messaging.CsvMessageHandler.ConstructHeader C# (CSharp) Method

ConstructHeader() private static method

private static ConstructHeader ( RecordDefinition recordDefinition ) : string
recordDefinition Adf.Core.Messaging.RecordDefinition
return string
        private static string ConstructHeader(RecordDefinition recordDefinition)
        {
            var header = new List<string>();
            int currentPosition = 0;

            foreach (FieldDefinition fieldDefinition in recordDefinition.Fields)
            {
                while (currentPosition < fieldDefinition.StartPosition)
                {
                    header.Add(string.Empty);
                    currentPosition++;
                }

                header.Add(fieldDefinition.Label);
                currentPosition++;
            }

            return string.Join(recordDefinition.FieldSeparator, header);
        }