Ejemplo n.º 1
0
        public void Analyze <TItem>(EngineImplementations <TItem> implementations, FieldDefinition definition)
            where TItem : class
        {
            if (definition.Description == null)
            {
                return;
            }

            var description = new AttributeFieldDescription(definition.Description);

            implementations.Descriptions.Add(definition.FieldName, description);
        }
Ejemplo n.º 2
0
        static public string CBF2AXL(string cbf)
        {
            // Test Header
            if (cbf.Length < 4 ||
                (cbf[0] != 0x05 || cbf[1] != 0x18 || cbf[2] != 0x01 || cbf[3] != 0x0))
            {
                return(cbf);
            }

            FileStream   fs = new FileStream(@"C:\binaryStream.hex", FileMode.Create);
            BinaryWriter bw = new BinaryWriter(fs);

            MemoryStream ms = new MemoryStream();

            for (int i = 0; i < cbf.Length; i++)
            {
                ms.WriteByte((byte)cbf[i]);
                bw.Write((byte)cbf[i]);
            }
            ms.Position = 0;

            BinaryReader br = new BinaryReader(ms);

            Header header = new Header();

            header.Read(br);

            List <AttributeFieldDescription> fields = new List <AttributeFieldDescription>();

            while (true)
            {
                AttributeFieldDescription field = new AttributeFieldDescription();
                if (!field.Read(br) || field.name == String.Empty)
                {
                    break;
                }

                fields.Add(field);
            }

            Shape shape = new Shape();

            shape.Read(br);
            return(String.Empty);
        }