Esempio n. 1
0
        public void WriteTo(File file)
        {
            List <AttributeType> attribs = new List <AttributeType>(_attrDefs.Keys);

            attribs.Sort();

            using (Stream s = file.OpenStream(AttributeType.Data, null, FileAccess.ReadWrite))
            {
                byte[] buffer;
                for (int i = 0; i < attribs.Count; ++i)
                {
                    buffer = new byte[AttributeDefinitionRecord.Size];
                    AttributeDefinitionRecord attrDef = _attrDefs[attribs[i]];
                    attrDef.Write(buffer, 0);

                    s.Write(buffer, 0, buffer.Length);
                }

                buffer = new byte[AttributeDefinitionRecord.Size];
                s.Write(buffer, 0, buffer.Length);
            }
        }