Comments (3)
Also A "Position/Index" is handy when inside the elements themselves.
from edi.net.
The attribute should also have a scope. Something like Container
& Self
. This will make a distinction when dealing lets say with structural segments like the Message trailer segment where where is need to present the segment count inside the parent container (The message) and not the self container (the segment)
from edi.net.
In the end I settled with EdiCountAttribute
that counts controls. That is contextual numbers of Segments, Messages and Groups.
At the moment it is used only in the EdiWriter
when serializing. (EdiReader
does not do validation with se same mechanism, at least not yet)
If placed on a model value property alongside with the EdiValueAttribute
it will override any existing value found in the model with the correct count from within the writer.
Some exmples fox X12 (same applies for EDIFact as well).
public class Interchange
{
/* ... other properties ... */
[EdiValue("9(1)", Path = "IEA/0", Description = "IEA01 - Num of Included Functional Grps")]
[EdiCount(EdiCountScope.Groups)]
public int GroupsCount { get; set; }
}
[EdiGroup]
public class FunctionalGroup
{
/* ... other properties ... */
[EdiValue("9(1)", Path = "GE/0", Description = "97 Number of Transaction Sets Included")]
[EdiCount(EdiCountScope.Messages)]
public int TransactionsCount { get; set; }
}
[EdiMessage]
public class Message
{
/* ... other properties ... */
[EdiValue(Path = "SE/0", Description = "SE01 - Number of included segments")]
[EdiCount(EdiCountScope.Segments)]
public int SegmentsCount { get; set; }
}
from edi.net.
Related Issues (20)
- Question for path HOT 3
- X12 - automatic detection of grammar
- Set font when use EdiSerializer().Deserialize
- X12 - Segment ISA - Component element separator HOT 2
- X12 - Reuse data segment code (example: N1 Loop Party Identification) HOT 1
- X12 - N1 Loop PartyIdentification for EDI 940 HOT 1
- Parser cannot process escaped plus sign for phone number in PartyMutuallyDefined NAD record HOT 1
- Two segment groups with the same path HOT 1
- Repeating element groups within segment for X12 830 HOT 1
- Repeated elements in a segment
- Picture with implicit V9 on decimal? still adds a decimal separator HOT 4
- [Q] Error was thrown for repeated segment groups HOT 3
- EdiCondition not working to RFF+CR HOT 1
- .net8 HOT 1
- Help understanding EdiSegment Path settings HOT 3
- Some Segments does not map properly
- List wih repeating elements HOT 4
- Enum deserialization does not work
- X12 270/271 Eligibility Benefit Inquiry
- TradaComs26v3 file Charge lines contain `=` sign in TCOD TariffDescription HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edi.net.