Ejemplo n.º 1
0
        /// <summary>
        /// Copy constructor.<br>
        /// Initializes the components list with a deep copy of the source components list. </summary>
        /// <param name="source"> a field instance to copy
        /// @since 7.7 </param>
        public static Field29B newInstance(Field29B source)
        {
            Field29B cp = new Field29B();

            cp.Components = new List <>(source.Components);
            return(cp);
        }
Ejemplo n.º 2
0
        public static Field29B fromJson(string json)
        {
            Field29B   field      = new Field29B();
            JsonParser parser     = new JsonParser();
            JsonObject jsonObject = (JsonObject)parser.parse(json);

            if (jsonObject.get("narrative") != null)
            {
                field.Component1 = jsonObject.get("narrative").AsString;
            }
            if (jsonObject.get("narrative2") != null)
            {
                field.Component2 = jsonObject.get("narrative2").AsString;
            }
            if (jsonObject.get("narrative3") != null)
            {
                field.Component3 = jsonObject.get("narrative3").AsString;
            }
            if (jsonObject.get("narrative4") != null)
            {
                field.Component4 = jsonObject.get("narrative4").AsString;
            }
            return(field);
        }
Ejemplo n.º 3
0
        public virtual IList <string> getLinesBetween(int start, int end, int offset)
        {
            Field29B cp = newInstance(this);

            return(SwiftParseUtils.getLines(getLine(cp, start, end, offset)));
        }
Ejemplo n.º 4
0
        public virtual IList <string> getLines(int offset)
        {
            Field29B cp = newInstance(this);

            return(SwiftParseUtils.getLines(getLine(cp, null, null, offset)));
        }
Ejemplo n.º 5
0
        public virtual string getLine(int line, int offset)
        {
            Field29B cp = newInstance(this);

            return(getLine(cp, line, null, offset));
        }