Exemplo n.º 1
0
 /// <summary>Create a message builder with default MSH segment containing only encoding characters.</summary>
 public MessageBuilder()
 {
     _segments             = new BuilderElementCache <SegmentBuilder>(CreateSegmentBuilder);
     ComponentDelimiter    = '^';
     EscapeCharacter       = '\\';
     RepetitionDelimiter   = '~';
     SubcomponentDelimiter = '&';
     FieldDelimiter        = '|';
     SetFields(1, "MSH", new string(FieldDelimiter, 1), new string(new[]
     {
         ComponentDelimiter, RepetitionDelimiter, EscapeCharacter, SubcomponentDelimiter
     }));
 }
Exemplo n.º 2
0
 private ComponentBuilder(IEncoding config, int index)
     : base(config, index)
 {
     _subcomponents = new BuilderElementCache <SubcomponentBuilder>(CreateSubcomponentBuilder);
 }
Exemplo n.º 3
0
 /// <summary>Create a component builder using the specified encoding configuration.</summary>
 /// <param name="builder">Ancestor builder.</param>
 /// <param name="index">Index of the component.</param>
 internal ComponentBuilder(Builder builder, int index)
     : base(builder, index)
 {
     _subcomponents = new BuilderElementCache <SubcomponentBuilder>(CreateSubcomponentBuilder);
 }
Exemplo n.º 4
0
 private SegmentBuilder(IEncoding config, int index)
     : base(config, index)
 {
     _fields = new BuilderElementCache <FieldBuilder>(CreateFieldBuilder);
 }
Exemplo n.º 5
0
 /// <summary>Create a segment builder with the specified encoding configuration.</summary>
 /// <param name="builder">Ancestor builder.</param>
 /// <param name="index">Index in the ancestor.</param>
 internal SegmentBuilder(Builder builder, int index)
     : base(builder, index)
 {
     _fields = new BuilderElementCache <FieldBuilder>(CreateFieldBuilder);
 }
Exemplo n.º 6
0
 private FieldBuilder(IEncoding config, int index)
     : base(config, index)
 {
     _repetitions = new BuilderElementCache <RepetitionBuilder>(CreateRepetitionBuilder);
 }
Exemplo n.º 7
0
 /// <summary>Create a field builder with the specified encoding configuration.</summary>
 /// <param name="builder">Ancestor builder.</param>
 /// <param name="index">Index in the ancestor.</param>
 internal FieldBuilder(Builder builder, int index)
     : base(builder, index)
 {
     _repetitions = new BuilderElementCache <RepetitionBuilder>(CreateRepetitionBuilder);
 }
Exemplo n.º 8
0
 private RepetitionBuilder(IEncoding config, int index)
     : base(config, index)
 {
     _components = new BuilderElementCache <ComponentBuilder>(CreateComponentBuilder);
 }
Exemplo n.º 9
0
 /// <summary>Create a repetition builder using the specified encoding configuration.</summary>
 /// <param name="builder">Ancestor builder.</param>
 /// <param name="index">Index in the ancestor.</param>
 internal RepetitionBuilder(Builder builder, int index)
     : base(builder, index)
 {
     _components = new BuilderElementCache <ComponentBuilder>(CreateComponentBuilder);
 }