Пример #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(NestedValue inNestedValue, TableLineRef inSourceRef)
        {
            switch (inNestedValue.Mode)
            {
            case ResolvableValueMode.Value:
            {
                Visit(inNestedValue.Value, inSourceRef);
                break;
            }

            case ResolvableValueMode.Query:
            {
                Visit(inNestedValue.Query, EntityScopedIdentifier.Type.Query, inSourceRef);
                break;
            }
            }
        }
Пример #3
0
        static private RuleFlags GetRuleFlags(NestedValue inValueData, RSLibrary inLibrary)
        {
            RuleFlags flags = 0;

            switch (inValueData.Mode)
            {
            case ResolvableValueMode.Query:
            {
                flags |= GetRuleFlags(inValueData.Query.Scope, inLibrary);
                flags |= GetRuleFlags(inLibrary.GetQuery(inValueData.Query.Id));
                break;
            }

            case ResolvableValueMode.Register:
            {
                flags |= RuleFlags.UsesRegisters;
                break;
            }
            }

            return(flags);
        }