Exemplo n.º 1
0
        /// <summary> Adds a new field to this record </summary>
        /// <param name="New_Field"> New field to add </param>
        public void Add_Field(MARC_Field New_Field)
        {
            if (New_Field == null)
            {
                return;
            }

            // Either add this to the existing list, or create a new one
            if (Fields.ContainsKey(New_Field.Tag))
            {
                Fields[New_Field.Tag].Add(New_Field);
            }
            else
            {
                List <MARC_Field> newTagCollection = new List <MARC_Field> {
                    New_Field
                };
                Fields[New_Field.Tag] = newTagCollection;
            }
        }
Exemplo n.º 2
0
        /// <summary> Add a new data field to this record </summary>
        /// <param name="Tag">Tag for new data field</param>
        /// <param name="Indicator1">First indicator for new data field</param>
        /// <param name="Indicator2">Second indicator for new data field</param>
        /// <returns>New data field object created and added</returns>
        public MARC_Field Add_Field(int Tag, char Indicator1, char Indicator2)
        {
            // Create the new datafield
            MARC_Field newField = new MARC_Field(Tag, Indicator1, Indicator2);

            // Either add this to the existing list, or create a new one
            if (Fields.ContainsKey(Tag))
            {
                Fields[Tag].Add(newField);
            }
            else
            {
                List <MARC_Field> newTagCollection = new List <MARC_Field> {
                    newField
                };
                Fields[Tag] = newTagCollection;
            }

            // Return the newlly built data field
            return(newField);
        }
Exemplo n.º 3
0
        /// <summary> Add a new control field to this record </summary>
        /// <param name="Tag">Tag for new control field</param>
        /// <param name="Control_Field_Value">Data for the new control field</param>
        /// <returns>New control field object created and added</returns>
        public MARC_Field Add_Field(int Tag, string Control_Field_Value)
        {
            // Create the new control field
            MARC_Field newField = new MARC_Field(Tag, Control_Field_Value);

            // Either add this to the existing list, or create a new one
            if (Fields.ContainsKey(Tag))
            {
                Fields[Tag].Add(newField);
            }
            else
            {
                List <MARC_Field> newTagCollection = new List <MARC_Field> {
                    newField
                };
                Fields[Tag] = newTagCollection;
            }

            // Return the newlly built control field
            return(newField);
        }