Skip to content

StartsAt does not work for fluentfiles #34

@tijlreynhout

Description

@tijlreynhout

I have the following configuration for an object.

WithMember(_ => _.Type, _ => _.StartsAt(0).WithLength(3))
      .WithMember(_ => _.UpdateCode, _ => _.StartsAt(3).WithLength(1))
      .WithMember(_ => _.CompanyIdForPayrollAdministration, _ => _.StartsAt(4).WithLength(7))
      .WithMember(_ => _.PayrollAdministrationNumber, _ => _.StartsAt(11).WithLength(20).WithRightPadding(' '))
      .WithMember(_ => _.DateOfPrestation, _ => _.StartsAt(31).WithLength(10).WithConverter(new DateTimeFormatter()))
      .Ignore(2)
      .WithMember(_ => _.PrestationCode, _ => _.WithLength(6).WithRightPadding(' '));

Currently the StartsAt is completely ignored. And when I try to use ignore to skip a certain width I get the following error: Cannot use a fixed width layout with an ignored section for writing.

This is for the case when you are writing a file. Any workarounds or ways I can fix this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions