示例#1
0
        public virtual bool Visit(ref NestedValue ioNestedValue)
        {
            bool bChanged = false;

            switch (ioNestedValue.Mode)
            {
            case ResolvableValueMode.Value:
            {
                RSValue val = ioNestedValue.Value;
                if (Visit(ref val))
                {
                    bChanged      = true;
                    ioNestedValue = NestedValue.FromValue(val);
                }
                break;
            }

            case ResolvableValueMode.Query:
            {
                EntityScopedIdentifier query = ioNestedValue.Query;
                if (Visit(ref query, EntityScopedIdentifier.Type.Query))
                {
                    bChanged      = true;
                    ioNestedValue = NestedValue.FromQuery(query);
                }
                break;
            }
            }

            return(bChanged);
        }
示例#2
0
 public virtual void Visit(RSValue inValue, TableLineRef inSourceRef)
 {
     if (inValue.GetInnerType() == RSValue.InnerType.EntityScope)
     {
         Visit(inValue.AsEntity, inSourceRef);
     }
 }
 public void CopyFrom(RSResolvableValueData inValue)
 {
     Mode           = inValue.Mode;
     Value          = inValue.Value;
     Query          = inValue.Query;
     QueryArguments = CloneUtils.Clone(inValue.QueryArguments);
     Register       = inValue.Register;
 }
示例#4
0
 static public NestedValue FromValue(RSValue inValue)
 {
     return(new NestedValue()
     {
         m_Mode = ResolvableValueMode.Value,
         m_Value = inValue
     });
 }
        static public void SetAsValue(ref RSResolvableValueData ioValue, RSValue inValue)
        {
            if (ioValue == null)
            {
                ioValue = new RSResolvableValueData();
            }

            ioValue.Mode           = ResolvableValueMode.Value;
            ioValue.Value          = inValue;
            ioValue.Query          = default(EntityScopedIdentifier);
            ioValue.QueryArguments = null;
            ioValue.Register       = RegisterIndex.Invalid;
        }
示例#6
0
        public virtual bool Visit(ref RSValue ioValue)
        {
            if (ioValue.GetInnerType() == RSValue.InnerType.EntityScope)
            {
                EntityScopeData scope = ioValue.AsEntity;
                if (Visit(ref scope))
                {
                    ioValue = RSValue.FromEntity(scope);
                    return(true);
                }
            }

            return(false);
        }
示例#7
0
            public override void Visit(RSValue inValue, TableLineRef inSourceRef)
            {
                base.Visit(inValue, inSourceRef);

                switch (inValue.GetInnerType())
                {
                case RSValue.InnerType.Enum:
                case RSValue.InnerType.String:
                {
                    string asString = inValue.AsString;
                    if (Match(asString))
                    {
                        AddRef(inSourceRef, asString);
                    }
                    break;
                }
                }
            }
示例#8
0
            public override void Visit(RSValue inValue, TableLineRef inSourceRef)
            {
                switch (inValue.GetInnerType())
                {
                case RSValue.InnerType.TriggerId:
                {
                    if (inValue.AsTriggerId == m_TriggerId)
                    {
                        AddRef(inSourceRef);
                    }
                    break;
                }

                default:
                {
                    base.Visit(inValue, inSourceRef);
                    break;
                }
                }
            }
示例#9
0
 public RSNamedValue(string inName, RSValue inValue)
 {
     Name  = inName;
     Value = inValue;
 }