Ejemplo n.º 1
0
        public void Read(BinaryReader reader)
        {
            _variables.Clear();
            var adaptor = new BinaryReadAdaptor(reader);
            var count   = adaptor.ReadInt32();

            for (var index = 0; index < count; index++)
            {
                var variable = new HttpFormVariableDetail();
                variable.Read(reader);
                _variables.Add(variable);
            }
        }
Ejemplo n.º 2
0
 public void Set(NameValueCollection variables)
 {
     _variables = new List <HttpFormVariableDetail>();
     if (variables != null)
     {
         for (var index = 0; index < variables.Count; ++index)
         {
             var variable = new HttpFormVariableDetail();
             var key      = variables.GetKey(index);
             var values   = variables.GetValues(index);
             variable.Set(key, values);
             _variables.Add(variable);
         }
     }
 }
Ejemplo n.º 3
0
        internal void ReadXml(XmlReadAdaptor adaptor, string elementName)
        {
            _variables.Clear();

            if (adaptor.ReadElement(elementName))
            {
                while (adaptor.IsReadingElement(Constants.Xml.HttpDetail.Form.VariableElement))
                {
                    var variable = new HttpFormVariableDetail();
                    variable.ReadXml(adaptor, Constants.Xml.HttpDetail.Form.VariableElement);
                    _variables.Add(variable);
                }

                adaptor.ReadEndElement();
            }
        }
Ejemplo n.º 4
0
 internal HttpFormVariableMemberWrapper(HttpFormVariableDetail value)
 {
     _value = value;
 }