public static void SetNameAndId(Field field, GroupValue fieldDef) { SetName(field, fieldDef); if (field.Id != null) { fieldDef.SetString("AuxId", field.Id); } }
public static GroupValue CreateOperator(Scalar scalar) { MessageTemplate operatorTemplate; if (!OperatorTemplateMap.TryGetValue(scalar.Operator, out operatorTemplate)) return null; GroupValue operatorMessage = new Message(operatorTemplate); if (!scalar.Dictionary.Equals(DictionaryFields.Global)) operatorMessage.SetString("Dictionary", scalar.Dictionary); if (!scalar.Key.Equals(scalar.QName)) { Group key = operatorTemplate.GetGroup("Key"); var keyValue = new GroupValue(key); keyValue.SetString("Name", scalar.Key.Name); keyValue.SetString("Ns", scalar.Key.Namespace); operatorMessage.SetFieldValue(key, keyValue); } return operatorMessage; }
public override GroupValue Convert(Field field, ConversionContext context) { var scalar = (Scalar) field; GroupValue fieldDef = base.Convert(field, context); if (scalar.HasAttribute(Error.FastConstants.LENGTH_FIELD)) { var lengthDef = new GroupValue(fieldDef.GetGroup().GetGroup("Length")); lengthDef.SetString("Name", scalar.GetAttribute(Error.FastConstants.LENGTH_FIELD)); fieldDef.SetFieldValue("Length", lengthDef); } return fieldDef; }
public override GroupValue Convert(Field field, ConversionContext context) { var scalar = (Scalar) field; GroupValue fieldDef = base.Convert(field, context); string value; if (scalar.TryGetAttribute(FastConstants.LengthField, out value)) { var lengthDef = new GroupValue(fieldDef.Group.GetGroup("Length")); lengthDef.SetString("Name", value); fieldDef.SetFieldValue("Length", lengthDef); } return fieldDef; }
public override GroupValue Convert(Field field, ConversionContext context) { var scalar = (Scalar)field; GroupValue fieldDef = base.Convert(field, context); if (scalar.HasAttribute(Error.FastConstants.LENGTH_FIELD)) { var lengthDef = new GroupValue(fieldDef.GetGroup().GetGroup("Length")); lengthDef.SetString("Name", scalar.GetAttribute(Error.FastConstants.LENGTH_FIELD)); fieldDef.SetFieldValue("Length", lengthDef); } return(fieldDef); }
public override GroupValue Convert(Field field, ConversionContext context) { var scalar = (Scalar)field; GroupValue fieldDef = base.Convert(field, context); string value; if (scalar.TryGetAttribute(FastConstants.LengthField, out value)) { var lengthDef = new GroupValue(fieldDef.Group.GetGroup("Length")); lengthDef.SetString("Name", value); fieldDef.SetFieldValue("Length", lengthDef); } return(fieldDef); }
public static GroupValue CreateOperator(Scalar scalar) { if (!OPERATOR_TEMPLATE_MAP.Contains(scalar.Operator)) { return(null); } var operatorTemplate = (MessageTemplate)OPERATOR_TEMPLATE_MAP[scalar.Operator]; GroupValue operatorMessage = new Message(operatorTemplate); if (!scalar.Dictionary.Equals(Dictionary_Fields.GLOBAL)) { operatorMessage.SetString("Dictionary", scalar.Dictionary); } if (!scalar.Key.Equals(scalar.QName)) { var key = operatorTemplate.GetGroup("Key"); var keyValue = new GroupValue(key); keyValue.SetString("Name", scalar.Key.Name); keyValue.SetString("Ns", scalar.Key.Namespace); operatorMessage.SetFieldValue(key, keyValue); } return(operatorMessage); }
public static GroupValue CreateOperator(Scalar scalar) { MessageTemplate operatorTemplate; if (!OperatorTemplateMap.TryGetValue(scalar.Operator, out operatorTemplate)) { return(null); } GroupValue operatorMessage = new Message(operatorTemplate); if (!scalar.Dictionary.Equals(DictionaryFields.Global)) { operatorMessage.SetString("Dictionary", scalar.Dictionary); } if (!scalar.Key.Equals(scalar.QName)) { Group key = operatorTemplate.GetGroup("Key"); var keyValue = new GroupValue(key); keyValue.SetString("Name", scalar.Key.Name); keyValue.SetString("Ns", scalar.Key.Namespace); operatorMessage.SetFieldValue(key, keyValue); } return(operatorMessage); }
public static void SetNameAndId(Field field, GroupValue fieldDef) { SetName(field, fieldDef); if (!field.IsIdNull()) fieldDef.SetString("AuxId", field.Id); }
public static void SetName(GroupValue fieldDef, QName qname) { fieldDef.SetString("Name", qname.Name); fieldDef.SetString("Ns", qname.Namespace); }
public static void SetName(Field field, GroupValue fieldDef) { fieldDef.SetString("Name", field.Name); fieldDef.SetString("Ns", field.QName.Namespace); }
public static GroupValue CreateOperator(Scalar scalar) { if (!OPERATOR_TEMPLATE_MAP.Contains(scalar.Operator)) return null; var operatorTemplate = (MessageTemplate) OPERATOR_TEMPLATE_MAP[scalar.Operator]; GroupValue operatorMessage = new Message(operatorTemplate); if (!scalar.Dictionary.Equals(Dictionary_Fields.GLOBAL)) operatorMessage.SetString("Dictionary", scalar.Dictionary); if (!scalar.Key.Equals(scalar.QName)) { var key = operatorTemplate.GetGroup("Key"); var keyValue = new GroupValue(key); keyValue.SetString("Name", scalar.Key.Name); keyValue.SetString("Ns", scalar.Key.Namespace); operatorMessage.SetFieldValue(key, keyValue); } return operatorMessage; }