Esempio n. 1
0
 public ScalarValue Lookup(string dictionary, Group group, QName key)
 {
     if (group.HasTypeReference())
     {
         currentApplicationType = group.TypeReference;
     }
     return(GetDictionary(dictionary).Lookup(group, key, currentApplicationType));
 }
 public void  Store(Group group, QName applicationType, QName key, ScalarValue value_Renamed)
 {
     if (!dictionary.ContainsKey(group.TypeReference))
     {
         dictionary[group.TypeReference] = new System.Collections.Generic.Dictionary <QName, ScalarValue>();
     }
     dictionary[group.TypeReference][key] = value_Renamed;
 }
 public ScalarValue Lookup(Group template, QName key, QName applicationType)
 {
     if (table.ContainsKey(template))
     {
         return (table[template]).ContainsKey(key) ? table[template][key] : ScalarValue.UNDEFINED;
     }
     return ScalarValue.UNDEFINED;
 }
Esempio n. 4
0
 public void  Store(string dictionary, Group group, QName key, ScalarValue valueToEncode)
 {
     if (group.HasTypeReference())
     {
         currentApplicationType = group.TypeReference;
     }
     GetDictionary(dictionary).Store(group, currentApplicationType, key, valueToEncode);
 }
 public void Store(Group group, QName applicationType, QName key, ScalarValue value_Renamed)
 {
     if (!dictionary.ContainsKey(group.TypeReference))
     {
         dictionary[group.TypeReference] = new System.Collections.Generic.Dictionary<QName, ScalarValue>();
     }
     dictionary[group.TypeReference][key]=value_Renamed;
 }
Esempio n. 6
0
 public ScalarValue Lookup(Group template, QName key, QName applicationType)
 {
     if (table.ContainsKey(template))
     {
         return((table[template]).ContainsKey(key) ? table[template][key] : ScalarValue.UNDEFINED);
     }
     return(ScalarValue.UNDEFINED);
 }
Esempio n. 7
0
        public void  Store(Group group, QName applicationType, QName key, ScalarValue valueToEncode)
        {
            if (!table.ContainsKey(group))
            {
                table[group] = new System.Collections.Generic.Dictionary <QName, ScalarValue>();
            }

            table[group][key] = valueToEncode;
        }
        public ScalarValue Lookup(Group template, QName key, QName applicationType)
        {
            if (!table.ContainsKey(key))
            {
                return ScalarValue.UNDEFINED;
            }

            return  table[key];
        }
        public void Store(Group group, QName applicationType, QName key, ScalarValue valueToEncode)
        {
            if (!table.ContainsKey(group))
            {
                table[group] = new System.Collections.Generic.Dictionary<QName,ScalarValue>();
            }

            table[group][key] = valueToEncode;
        }
Esempio n. 10
0
        public ScalarValue Lookup(Group template, QName key, QName applicationType)
        {
            if (!table.ContainsKey(key))
            {
                return(ScalarValue.UNDEFINED);
            }

            return(table[key]);
        }
Esempio n. 11
0
        public void  GroupStart(Group group)
        {
            var traceGroup = new TraceGroup(group);

            if (!(stack.Count == 0))
            {
                ((TraceGroup)stack[stack.Count - 1]).AddGroup(traceGroup);
            }
            stack.Add(traceGroup);
        }
 public ScalarValue Lookup(Group template, QName key, QName applicationType)
 {
     if (dictionary.ContainsKey(template.TypeReference))
     {
         var applicationTypeMap = (System.Collections.IDictionary) dictionary[template.TypeReference];
         if (applicationTypeMap.Contains(key))
             return (ScalarValue) applicationTypeMap[key];
     }
     return ScalarValue.UNDEFINED;
 }
Esempio n. 13
0
 public ScalarValue Lookup(Group template, QName key, QName applicationType)
 {
     if (dictionary.ContainsKey(template.TypeReference))
     {
         var applicationTypeMap = (System.Collections.IDictionary)dictionary[template.TypeReference];
         if (applicationTypeMap.Contains(key))
         {
             return((ScalarValue)applicationTypeMap[key]);
         }
     }
     return(ScalarValue.UNDEFINED);
 }
 public static Message Convert(Group group, Message groupMsg, ConversionContext context)
 {
     SetNameAndId(group, groupMsg);
     var instructions = new SequenceValue(SessionControlProtocol_1_1.TEMPLATE_DEFINITION.GetSequence("Instructions"));
     int i = group is MessageTemplate?1:0;
     Field[] fields = group.FieldDefinitions;
     for (; i < fields.Length; i++)
     {
         Field field = fields[i];
         FieldInstructionConverter converter = context.GetConverter(field);
         if (converter == null)
             throw new System.SystemException("No converter found for type " + field.GetType());
         FieldValue value_Renamed = converter.Convert(field, context);
         instructions.Add(new[]{value_Renamed});
     }
     groupMsg.SetFieldValue("Instructions", instructions);
     return groupMsg;
 }
Esempio n. 15
0
        public GroupValue(Group group, FieldValue[] values)
        {
            if (group == null)
            {
                throw new NullReferenceException();
            }

            this.group = group;
            this.values = values;

            for (var i = 0; i < group.FieldCount; i++)
            {
                if (!(group.GetField(i) is Scalar)) continue;
                var scalar = ((Scalar) group.GetField(i));
                if (scalar.Operator.Equals(Operator.CONSTANT) && !scalar.Optional)
                {
                    values[i] = scalar.DefaultValue;
                }
            }
        }
Esempio n. 16
0
        public static Message Convert(Group group, Message groupMsg, ConversionContext context)
        {
            SetNameAndId(group, groupMsg);
            var instructions = new SequenceValue(SessionControlProtocol_1_1.TEMPLATE_DEFINITION.GetSequence("Instructions"));
            int i            = group is MessageTemplate?1:0;

            Field[] fields = group.FieldDefinitions;
            for (; i < fields.Length; i++)
            {
                Field field = fields[i];
                FieldInstructionConverter converter = context.GetConverter(field);
                if (converter == null)
                {
                    throw new System.SystemException("No converter found for type " + field.GetType());
                }
                FieldValue value_Renamed = converter.Convert(field, context);
                instructions.Add(new[] { value_Renamed });
            }
            groupMsg.SetFieldValue("Instructions", instructions);
            return(groupMsg);
        }
Esempio n. 17
0
        public GroupValue(Group group, FieldValue[] values)
        {
            if (group == null)
            {
                throw new NullReferenceException();
            }

            this.group  = group;
            this.values = values;

            for (var i = 0; i < group.FieldCount; i++)
            {
                if (!(group.GetField(i) is Scalar))
                {
                    continue;
                }
                var scalar = ((Scalar)group.GetField(i));
                if (scalar.Operator.Equals(Operator.CONSTANT) && !scalar.Optional)
                {
                    values[i] = scalar.DefaultValue;
                }
            }
        }
Esempio n. 18
0
 public ScalarValue Lookup(string dictionary, Group group, QName key)
 {
     if (group.HasTypeReference())
         currentApplicationType = group.TypeReference;
     return GetDictionary(dictionary).Lookup(group, key, currentApplicationType);
 }
Esempio n. 19
0
 public GroupValue(Group group)
     : this(group, new FieldValue[group.FieldCount])
 {
 }
 public void GroupStart(Group group)
 {
     print(group);
     moveDown();
 }
 public static Operator GetOperator(Group group)
 {
     return (Operator) TEMPLATE_OPERATOR_MAP[group];
 }
 public TraceGroup(Group group)
 {
     this.group = group;
     nodes = new System.Collections.ArrayList(group.FieldCount);
 }
 public void GroupStart(Group group)
 {
     var traceGroup = new TraceGroup(group);
     if (!(stack.Count == 0))
     {
         ((TraceGroup) stack[stack.Count - 1]).AddGroup(traceGroup);
     }
     stack.Add(traceGroup);
 }
Esempio n. 24
0
 public virtual FieldInstructionConverter GetConverter(Group group)
 {
     return(converterTemplateMap[group]);
 }
 public void Store(Group group, QName applicationType, QName key, ScalarValue value_Renamed)
 {
     table[key] = value_Renamed;
 }
Esempio n. 26
0
 public TraceGroup(Group group)
 {
     this.group = group;
     nodes      = new System.Collections.ArrayList(group.FieldCount);
 }
 public static Operator GetOperator(Group group)
 {
     return((Operator)TEMPLATE_OPERATOR_MAP[group]);
 }
Esempio n. 28
0
 public GroupValue(Group group) : this(group, new FieldValue[group.FieldCount])
 {
 }
Esempio n. 29
0
 public void  Store(Group group, QName applicationType, QName key, ScalarValue value_Renamed)
 {
     table[key] = value_Renamed;
 }
Esempio n. 30
0
 public void  GroupStart(Group group)
 {
     print(group);
     moveDown();
 }
 public virtual FieldInstructionConverter GetConverter(Group group)
 {
     return converterTemplateMap[group];
 }
Esempio n. 32
0
 public void Store(string dictionary, Group group, QName key, ScalarValue valueToEncode)
 {
     if (group.HasTypeReference())
         currentApplicationType = group.TypeReference;
     GetDictionary(dictionary).Store(group, currentApplicationType, key, valueToEncode);
 }