Giter Site home page Giter Site logo

Comments (2)

cleftheris avatar cleftheris commented on May 18, 2024

Copied over from #14

This issue is related to cases when an Element (a set of components) is resurfacing under different segment name. Lets say we got the AddressInfo complex type and it is on the second element of segment XXX\1 and the third element of YYY\2. Currently there is no way to reuse class AddressInfo one must make two copies or subclasses of that for each location. The above problem I have found is more related to how a TRADACOMS transmission is layered out.

On EdiFact on the other hand, Segments are used as the main org unit. So in this case the flexibility to reuse a class is fully supported. Check for example this model and how the DTM segment is handled.

from edi.net.

cleftheris avatar cleftheris commented on May 18, 2024

@thizzo Following the discussion on #104, I find your proposal interesting and I am aiming for something similar but without introducing a new Path attribute for Elements since I want to keep complexity to a minimal set of attributes.

What I am proposing would have some kind of known wildcard character to declare dynamic path like the following.

[EdiElement]
public class CompositeDataElement 
{
    [EdiValue("X(18)"), Path="?/?/0"]
    public string A{ get; set; }    

    [EdiValue("X(3)"), Path="?/?/1"]
    public string B { get; set; }    

    [EdiValue("X(70)"), Path="?/?/2"]
    public string C { get; set; }
}

[EdiSegment, EdiPath("BBB")]
public class SegmentB
{ 
    [EdiPath("BBB/1")]
    public CompositeDataElement { get; set;}
}

from edi.net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.