コード例 #1
0
        public override ComputationTarget DeserializeImpl(IFudgeFieldContainer ffc, IFudgeDeserializer deserializer)
        {
            var computationTargetType = EnumBuilder <ComputationTargetType> .Parse(ffc.GetMessage("type").GetString(1));

            object value = GetValue(deserializer, ffc.GetByName("value"));

            return(new ComputationTarget(computationTargetType, value));
        }
コード例 #2
0
        public override ComputationTargetSpecification DeserializeImpl(IFudgeFieldContainer msg, IFudgeDeserializer deserializer)
        {
            ComputationTargetType?type = null;
            UniqueId uid = null;

            foreach (var field in msg)
            {
                switch (field.Name)
                {
                case "computationTargetType":
                    type = EnumBuilder <ComputationTargetType> .Parse((string)field.Value);

                    break;

                case "computationTargetIdentifier":
                    uid = UniqueId.Parse((string)field.Value);
                    break;

                default:
                    break;
                }
            }
            return(new ComputationTargetSpecification(type.Value, uid));
        }