Exemplo n.º 1
0
        public AttributeRecord CreateAttributeRecord(AttributeType type, string name)
        {
            AttributeRecord attribute = AttributeRecord.Create(type, name, m_segments[0].NextAttributeInstance);

            m_segments[0].NextAttributeInstance++;
            FileRecordHelper.InsertSorted(this.Attributes, attribute);
            return(attribute);
        }
Exemplo n.º 2
0
        public AttributeRecord CreateAttributeRecord(AttributeType type, string name)
        {
            AttributeRecord attribute = AttributeRecord.Create(type, name, NextAttributeInstance);

            NextAttributeInstance++;
            FileRecordHelper.InsertSorted(m_immediateAttributes, attribute);
            return(attribute);
        }
Exemplo n.º 3
0
        internal AttributeRecord CreateAttributeRecord(AttributeType type, string name, bool isResident)
        {
            AttributeRecord attribute = AttributeRecord.Create(type, name, isResident);

            attribute.Instance = NextAttributeInstance;
            NextAttributeInstance++;
            FileRecordHelper.InsertSorted(m_immediateAttributes, attribute);
            return(attribute);
        }
Exemplo n.º 4
0
        public AttributeRecord CreateAttributeRecord(AttributeType type, string name)
        {
            if (name.Length > AttributeRecord.MaxAttributeNameLength)
            {
                throw new InvalidNameException();
            }

            bool            isResident = (type != AttributeType.IndexAllocation);
            AttributeRecord attribute  = AttributeRecord.Create(type, name, isResident);

            FileRecordHelper.InsertSorted(this.Attributes, attribute);
            return(attribute);
        }
Exemplo n.º 5
0
        public AttributeRecord CreateAttributeListRecord(bool isResident)
        {
            AttributeRecord attribute;

            if (isResident)
            {
                attribute = AttributeRecord.Create(AttributeType.AttributeList, String.Empty, NextAttributeInstance);
            }
            else
            {
                attribute = NonResidentAttributeRecord.Create(AttributeType.AttributeList, String.Empty, NextAttributeInstance);
            }
            NextAttributeInstance++;
            FileRecordHelper.InsertSorted(m_immediateAttributes, attribute);
            return(attribute);
        }