Пример #1
0
        public void Deserialize_V1(Stream stream, DataVersion version)
        {
            Byte[] intBuffer = new Byte[sizeof(UInt32)];
            BaseCadenceTarget.IConcreteCadenceTarget.CadenceTargetType type;

            stream.Read(intBuffer, 0, sizeof(UInt32));
            type = (BaseCadenceTarget.IConcreteCadenceTarget.CadenceTargetType)BitConverter.ToUInt32(intBuffer, 0);

            switch (type)
            {
                case BaseCadenceTarget.IConcreteCadenceTarget.CadenceTargetType.ZoneST:
                    {
                        m_ConcreteTarget = new CadenceZoneSTTarget(stream, version, this);
                        break;
                    }
                case BaseCadenceTarget.IConcreteCadenceTarget.CadenceTargetType.Range:
                    {
                        m_ConcreteTarget = new CadenceRangeTarget(stream, version, this);
                        break;
                    }
                default:
                    {
                        Debug.Assert(false);
                        break;
                    }
            }
        }
Пример #2
0
 public new void Deserialize_V0(Stream stream, DataVersion version)
 {
     // In V0, we only have GTC zone type
     m_ConcreteTarget = new CadenceRangeTarget(stream, version, this);
 }