internal override void Save()
        {
            Entity.PredicateType = (int)PredicateType;

            LeftPath?.Save();
            Entity.LeftPath = LeftPath?.Entity;
            RightPath?.Save();
            Entity.RightPath = RightPath?.Entity;

            Entity.RightStaticValue = JsonConvert.SerializeObject(RightStaticValue);

            if (Operator != null)
            {
                Entity.OperatorPluginGuid = Operator.PluginInfo.Guid;
                Entity.OperatorType       = Operator.GetType().Name;
            }
        }
Пример #2
0
        internal override void Save()
        {
            // Don't save an invalid state
            if (LeftPath != null && !LeftPath.IsValid || RightPath != null && !RightPath.IsValid)
            {
                return;
            }

            Entity.PredicateType = (int)PredicateType;

            LeftPath?.Save();
            Entity.LeftPath = LeftPath?.Entity;
            RightPath?.Save();
            Entity.RightPath = RightPath?.Entity;

            Entity.RightStaticValue = CoreJson.SerializeObject(RightStaticValue);

            if (Operator?.Plugin != null)
            {
                Entity.OperatorPluginGuid = Operator.Plugin.Guid;
                Entity.OperatorType       = Operator.GetType().Name;
            }
        }