コード例 #1
0
        private LogSystemConfiguration(LogSystemConfigurationDto dto) : this()
        {
            Name = dto.Name;
            PartitionLifetime = dto.PartitionLifetime;

            foreach (var logFieldDto in dto.Fields)
            {
                var logField = new LogField(logFieldDto.Name, TypeMapping.FromTypeName(logFieldDto.TypeName));

                if (string.Equals(logField.Name, dto.DateTimeField, StringComparison.OrdinalIgnoreCase))
                {
                    DateTimeField = logField;
                }

                if (dto.SortFields.Contains(logField.Name, StringComparer.OrdinalIgnoreCase))
                {
                    _orderByFields.Add(logField);
                }

                _fieldsDictionary.Add(logField.Name, logField);
                _fields.Add(logField);
            }
        }
コード例 #2
0
 public static FieldSchema FromDto(FieldSchemaDto fieldSchemaDto)
 {
     return(new FieldSchema(fieldSchemaDto.Name, TypeMapping.FromTypeName(fieldSchemaDto.TypeName)));
 }