예제 #1
0
        public FieldImpl(PlexOfField startPlex, PlexOfField separatorPlex,
                PlexOfField endPlex)
        {
            if (startPlex == null)
                throw new ArgumentException("startPlex == null");
            if (endPlex == null)
                throw new ArgumentException("endPlex == null");

            if (startPlex.Fld.GetBoundaryType() != FieldDescriptor.FIELD_BEGIN_MARK)
                throw new ArgumentException("startPlex (" + startPlex
                        + ") is not type of FIELD_BEGIN");

            if (separatorPlex != null
                    && separatorPlex.Fld.GetBoundaryType() != FieldDescriptor.FIELD_SEPARATOR_MARK)
                throw new ArgumentException("separatorPlex" + separatorPlex
                        + ") is not type of FIELD_SEPARATOR");

            if (endPlex.Fld.GetBoundaryType() != FieldDescriptor.FIELD_END_MARK)
                throw new ArgumentException("endPlex (" + endPlex
                        + ") is not type of FIELD_END");

            this.startPlex = startPlex;
            this.separatorPlex = separatorPlex;
            this.endPlex = endPlex;
        }
예제 #2
0
        private static List<PlexOfField> ToArrayList(PlexOfCps plexOfCps)
        {
            if (plexOfCps == null)
                return new List<PlexOfField>();

            List<PlexOfField> fields = new List<PlexOfField>(
                    plexOfCps.Length);
            for (int i = 0; i < plexOfCps.Length; i++)
            {
                GenericPropertyNode propNode = plexOfCps.GetProperty(i);
                PlexOfField plex = new PlexOfField(propNode);
                fields.Add(plex);
            }

            return fields;
        }
예제 #3
0
        private static List <PlexOfField> ToArrayList(PlexOfCps plexOfCps)
        {
            if (plexOfCps == null)
            {
                return(new List <PlexOfField>());
            }

            List <PlexOfField> fields = new List <PlexOfField>(
                plexOfCps.Length);

            for (int i = 0; i < plexOfCps.Length; i++)
            {
                GenericPropertyNode propNode = plexOfCps.GetProperty(i);
                PlexOfField         plex     = new PlexOfField(propNode);
                fields.Add(plex);
            }

            return(fields);
        }