Ejemplo n.º 1
0
        protected virtual void ReadVr_PN(JsonTextReader reader, fo.DicomTag tag, fo.DicomDataset dataset)
        {
            List <string> pnNames = new List <string> ( );


            while (reader.Read( ) && reader.TokenType == JsonToken.StartArray)
            {
                PersonNameValue personName = new PersonNameValue( );


                //keep reading until reach end of array
                while (reader.Read( ) && reader.TokenType != JsonToken.EndArray)
                {
                    PersonNameReader pnReader = new PersonNameReader( );


                    while (reader.Read( ) && reader.TokenType == JsonToken.PropertyName)
                    {
                        string componentName = (string)reader.Value;
                        string component     = "";


                        if (reader.Read( ))
                        {
                            component = (string)reader.Value;
                        }

                        pnReader.Add(componentName, component);
                    }

                    personName.Add(pnReader);
                }

                dataset.AddOrUpdate <string> (tag, personName.ToString( ));

                break;
            }
        }
Ejemplo n.º 2
0
 internal void Add(PersonNameReader pnReader)
 {
     _rawValue += pnReader.ToString( ) + "\\";
 }