ToString() static private method

static private ToString ( object value ) : string
value object
return string
示例#1
0
        protected void SetListValue(object value, XmlSchemaDatatype datatype)
        {
            string   strValue = ListSimpleTypeValidator.ToString(value);
            XElement element  = this.GetUntyped();

            element.Value = strValue;
        }
        internal override bool MatchEnumeration(object value, ArrayList enumeration, XmlSchemaDatatype datatype)
        {
            string strValue = ListSimpleTypeValidator.ToString(value);

            foreach (object correctArray in enumeration)
            {
                if (strValue.Equals(correctArray))
                {
                    return(true);
                }
            }
            return(false);
        }
示例#3
0
        private void SaveValue()
        {
            switch (containerType)
            {
            case ContainerType.Element:
                containerElement.Value = ListSimpleTypeValidator.ToString(this.items);
                return;

            case ContainerType.Attribute:
                XAttribute attr = containerElement.Attribute(itemXName);
                Debug.Assert(attr != null);
                attr.Value = ListSimpleTypeValidator.ToString(this.items);
                return;
            }
        }
示例#4
0
        private void SaveValue()
        {
            switch (this.containerType)
            {
            case ContainerType.Attribute:
            {
                XAttribute attr = this.containerElement.Attribute(this.itemXName);
                Debug.Assert(attr != null);
                attr.Value = ListSimpleTypeValidator.ToString(this.items);
                break;
            }

            case ContainerType.Element:
            {
                this.containerElement.Value = ListSimpleTypeValidator.ToString(this.items);
                break;
            }
            }
        }
 protected void SetListElement(XName name, object value, XmlSchemaDatatype datatype)
 {
     this.SetElement(name, ListSimpleTypeValidator.ToString(value), datatype);
 }
示例#6
0
 protected void SetListAttribute(XName name,
                                 object value,
                                 XmlSchemaDatatype datatype)
 {
     SetAttribute(name, ListSimpleTypeValidator.ToString(value), datatype);
 }