Пример #1
0
 public void AddField(FieldDefinition field)
 {
     fieldDefs.Add(field);
 }
Пример #2
0
        public void Read(Stream fitSource)
        {
            fitSource.Position = 0;
             EndianBinaryReader br = new EndianBinaryReader(fitSource, false);

             LocalMesgNum = (byte)(br.ReadByte() & Fit.LocalMesgNumMask);
             byte reserved = br.ReadByte();
             architecture = br.ReadByte();
             br.IsBigEndian = this.IsBigEndian;
             GlobalMesgNum = br.ReadUInt16();
             NumFields = br.ReadByte();
             for (int i=0; i<NumFields; i++)
             {
            FieldDefinition newField = new FieldDefinition();
            newField.Num = br.ReadByte();
            newField.Size = br.ReadByte();
            newField.Type = br.ReadByte();
            fieldDefs.Add(newField);
             }
        }
Пример #3
0
 public FieldDefinition(FieldDefinition fieldDef)
 {
     Num = fieldDef.Num;
      Size = fieldDef.Size;
      Type = fieldDef.Type;
 }