Skip to content

Analyzer: Should consider Custom Serializers #4428

Open
@jensbrand

Description

@jensbrand

Is your feature request related to a problem? Please describe.
In CSLA 9 the MobileFormatter now supports the concept of custom serializers for types that are not normally serializable. You can configure these in your program's startup code like this:

builder.Services.AddCsla(o => o
  .Serialization(s => s
    .UseMobileFormatter(m => m
      .CustomSerializers.Add(
        new TypeMap<MyType, PocoSerializer<MyType>>(PocoSerializer<MyType>.CanSerialize))
    ))));

If you use such type in any DataPortal operation the warning "CSLA0010 : Operation argument types should be serializable" is thrown.

Describe the solution you'd like
The analyzer should consider the custom serializers and not throw this warning.

Describe alternatives you've considered
You can ignore the warning but then you have to check the correct serialisation of all the custom types.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions