public void ElementNameDefault ()
		{
			XmlArrayItemAttribute attr = new XmlArrayItemAttribute ();
			Assert.AreEqual (string.Empty, attr.ElementName, "#1");

			attr.ElementName = null;
			Assert.AreEqual (string.Empty, attr.ElementName, "#2");
		}
		public void DataTypeDefault ()
		{
			XmlArrayItemAttribute attr = new XmlArrayItemAttribute ();
			Assert.AreEqual (string.Empty, attr.DataType, "#1");

			attr.DataType = null;
			Assert.AreEqual (string.Empty, attr.DataType, "#2");
		}
Example #3
0
        /// <include file='doc\XmlArrayItemAttributes.uex' path='docs/doc[@for="XmlArrayItemAttributes.Insert"]/*' />
        /// <devdoc>
        ///    <para>[To be supplied.]</para>
        /// </devdoc>
        public void Insert(int index, XmlArrayItemAttribute value)
        {
            if (value == null)
            {
                throw new ArgumentNullException(nameof(value));
            }

            _list.Insert(index, value);
        }
Example #4
0
        /// <include file='doc\XmlArrayItemAttributes.uex' path='docs/doc[@for="XmlArrayItemAttributes.Add"]/*' />
        /// <devdoc>
        ///    <para>[To be supplied.]</para>
        /// </devdoc>
        public int Add(XmlArrayItemAttribute value)
        {
            if (value == null)
            {
                throw new ArgumentNullException(nameof(value));
            }

            int index = _list.Count;
            _list.Add(value);
            return index;
        }
        /// <devdoc>
        ///    <para>[To be supplied.]</para>
        /// </devdoc>
        public void Remove(XmlArrayItemAttribute value)
        {
            if (value == null)
            {
                throw new ArgumentNullException(nameof(value));
            }

            if (!_list.Remove(value))
            {
                throw new ArgumentException(SR.Arg_RemoveArgNotFound);
            }
        }
		public void DifferentItemTypes()
		{
			XmlArrayItemAttribute array1 = new XmlArrayItemAttribute("myname", typeof(SerializeMe));
			XmlArrayItemAttribute array2 = new XmlArrayItemAttribute("myname", typeof(SerializeMeToo));

			atts1.XmlArrayItems.Add(array1);
			atts2.XmlArrayItems.Add(array2);

			ov1.Add(typeof(SerializeMe), atts1);
			ov2.Add(typeof(SerializeMe), atts2);

			ThumbprintHelpers.DifferentThumbprint(ov1, ov2);
		}
		public void SameDataType()
		{
			XmlArrayItemAttribute array1 = new XmlArrayItemAttribute("myname", typeof(SerializeMe));
			array1.DataType = "myfirstxmltype";
			XmlArrayItemAttribute array2 = new XmlArrayItemAttribute("myname", typeof(SerializeMe));
			array2.DataType = "myfirstxmltype";

			atts1.XmlArrayItems.Add(array1);
			atts2.XmlArrayItems.Add(array2);

			ov1.Add(typeof(SerializeMe), atts1);
			ov2.Add(typeof(SerializeMe), atts2);

			ThumbprintHelpers.SameThumbprint(ov1, ov2);
		}
		public void SameElementName()
		{
			XmlArrayItemAttribute array1 = new XmlArrayItemAttribute("myname");
			XmlArrayItemAttribute array2 = new XmlArrayItemAttribute("myname");

			atts1.XmlArrayItems.Add( array1 );
			atts2.XmlArrayItems.Add( array2 );

			ov1.Add(typeof(SerializeMe), atts1);
			ov2.Add(typeof(SerializeMe), atts2);

			ThumbprintHelpers.SameThumbprint(ov1, ov2);
		}
Example #9
0
 /// <include file='doc\XmlArrayItemAttributes.uex' path='docs/doc[@for="XmlArrayItemAttributes.Add"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public int Add(XmlArrayItemAttribute attribute) {
     return List.Add(attribute);
 }
 public void Insert(int index, System.Xml.Serialization.XmlArrayItemAttribute attribute)
 {
 }
 public bool Contains(System.Xml.Serialization.XmlArrayItemAttribute attribute)
 {
     throw null;
 }
 private static XmlArrayItemAttribute AddArrayItemMemberMappingInternal(Type type, string elementName, bool isNullable)
 {
     XmlArrayItemAttribute arrayItem = new XmlArrayItemAttribute();
     arrayItem.ElementName = elementName;
     arrayItem.IsNullable = isNullable;
     arrayItem.Type = type;
     return arrayItem;
 }
 /// <include file='doc\XmlArrayItemAttributes.uex' path='docs/doc[@for="XmlArrayItemAttributes.Contains"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public bool Contains(XmlArrayItemAttribute attribute)
 {
     return(List.Contains(attribute));
 }
Example #14
0
		public void NamespaceDefault ()
		{
			XmlArrayItemAttribute attr = new XmlArrayItemAttribute ();
			Assert.IsNull (attr.Namespace);
		}
Example #15
0
		public void IsNullableDefault ()
		{
			XmlArrayItemAttribute attr = new XmlArrayItemAttribute ();
			Assert.AreEqual (false, attr.IsNullable);
		}
Example #16
0
		public void FormDefault ()
		{
			XmlArrayItemAttribute attr = new XmlArrayItemAttribute ();
			Assert.AreEqual (XmlSchemaForm.None, attr.Form);
		}
		public void DifferentNullable()
		{
			XmlArrayItemAttribute array1 = new XmlArrayItemAttribute("myname");
			array1.IsNullable = true;
			XmlArrayItemAttribute array2 = new XmlArrayItemAttribute("myname");
			array2.IsNullable = false;

			atts1.XmlArrayItems.Add( array1 );
			atts2.XmlArrayItems.Add( array2 );

			ov1.Add(typeof(SerializeMe), atts1);
			ov2.Add(typeof(SerializeMe), atts2);

			ThumbprintHelpers.DifferentThumbprint(ov1, ov2);
		}
		public void DifferentForm()
		{
			XmlArrayItemAttribute array1 = new XmlArrayItemAttribute("myname");
			array1.Form = System.Xml.Schema.XmlSchemaForm.Qualified;
			XmlArrayItemAttribute array2 = new XmlArrayItemAttribute("myname");
			array2.Form = System.Xml.Schema.XmlSchemaForm.Unqualified;

			atts1.XmlArrayItems.Add( array1 );
			atts2.XmlArrayItems.Add( array2 );

			ov1.Add(typeof(SerializeMe), atts1);
			ov2.Add(typeof(SerializeMe), atts2);

			ThumbprintHelpers.DifferentThumbprint(ov1, ov2);
		}
		public void DifferentDataTypes()
		{
			XmlArrayItemAttribute array1 = new XmlArrayItemAttribute();
			array1.DataType = "typeone";
			XmlArrayItemAttribute array2 = new XmlArrayItemAttribute();
			array2.DataType = "typetwo";

			atts1.XmlArrayItems.Add(array1);
			atts2.XmlArrayItems.Add(array2);

			ov1.Add(typeof(SerializeMe), atts1);
			ov2.Add(typeof(SerializeMe), atts2);

			ThumbprintHelpers.DifferentThumbprint(ov1, ov2);
		}
 /// <include file='doc\XmlArrayItemAttributes.uex' path='docs/doc[@for="XmlArrayItemAttributes.Insert"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public void Insert(int index, XmlArrayItemAttribute attribute)
 {
     List.Insert(index, attribute);
 }
Example #21
0
		public void NestingLevelDefault ()
		{
			XmlArrayItemAttribute attr = new XmlArrayItemAttribute ();
			Assert.AreEqual (0, attr.NestingLevel);
		}
 /// <include file='doc\XmlArrayItemAttributes.uex' path='docs/doc[@for="XmlArrayItemAttributes.IndexOf"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public int IndexOf(XmlArrayItemAttribute attribute)
 {
     return(List.IndexOf(attribute));
 }
Example #23
0
		public void TypeDefault ()
		{
			XmlArrayItemAttribute attr = new XmlArrayItemAttribute ();
			Assert.IsNull (attr.Type);
		}
 /// <include file='doc\XmlArrayItemAttributes.uex' path='docs/doc[@for="XmlArrayItemAttributes.Remove"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public void Remove(XmlArrayItemAttribute attribute)
 {
     List.Remove(attribute);
 }
Example #25
0
 /// <include file='doc\XmlArrayItemAttributes.uex' path='docs/doc[@for="XmlArrayItemAttributes.IndexOf"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public int IndexOf(XmlArrayItemAttribute attribute) {
     return List.IndexOf(attribute);
 }
 static XmlArrayItemAttribute CreateArrayItemAttribute(TypeDesc typeDesc, int nestingLevel) {
     XmlArrayItemAttribute xmlArrayItem = new XmlArrayItemAttribute();
     xmlArrayItem.NestingLevel = nestingLevel;
     return xmlArrayItem;
 }
Example #27
0
 /// <include file='doc\XmlArrayItemAttributes.uex' path='docs/doc[@for="XmlArrayItemAttributes.Remove"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public void Remove(XmlArrayItemAttribute attribute) {
     List.Remove(attribute);
 }
 public int IndexOf(System.Xml.Serialization.XmlArrayItemAttribute attribute)
 {
     throw null;
 }
		public void DifferentNamespace()
		{
			XmlArrayItemAttribute array1 = new XmlArrayItemAttribute("myname");
			array1.Namespace = "mynamespace";
			XmlArrayItemAttribute array2 = new XmlArrayItemAttribute("myname");
			array2.Namespace = "myothernamespace";

			atts1.XmlArrayItems.Add( array1 );
			atts2.XmlArrayItems.Add( array2 );

			ov1.Add(typeof(SerializeMe), atts1);
			ov2.Add(typeof(SerializeMe), atts2);

			ThumbprintHelpers.DifferentThumbprint(ov1, ov2);
		}
 public void Remove(System.Xml.Serialization.XmlArrayItemAttribute attribute)
 {
 }
Example #31
0
 /// <include file='doc\XmlArrayItemAttributes.uex' path='docs/doc[@for="XmlArrayItemAttributes.IndexOf"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public int IndexOf(XmlArrayItemAttribute value)
 {
     return _list.IndexOf(value);
 }
Example #32
0
 /// <include file='doc\XmlArrayItemAttributes.uex' path='docs/doc[@for="XmlArrayItemAttributes.Insert"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public void Insert(int index, XmlArrayItemAttribute attribute) {
     List.Insert(index, attribute);
 }
		public void DifferentMemberName()
		{
			XmlArrayItemAttribute array1 = new XmlArrayItemAttribute("myname");
			XmlArrayItemAttribute array2 = new XmlArrayItemAttribute("myname");

			atts1.XmlArrayItems.Add( array1 );
			atts2.XmlArrayItems.Add( array2 );

			ov1.Add(typeof(SerializeMe), "TheMember", atts1);
			ov2.Add(typeof(SerializeMe), "TheOtherMember", atts2);

			ThumbprintHelpers.DifferentThumbprint(ov1, ov2);
		}
Example #34
0
 /// <include file='doc\XmlArrayItemAttributes.uex' path='docs/doc[@for="XmlArrayItemAttributes.Contains"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public bool Contains(XmlArrayItemAttribute attribute) {
     return List.Contains(attribute);
 }
Example #35
0
 /// <include file='doc\XmlArrayItemAttributes.uex' path='docs/doc[@for="XmlArrayItemAttributes.IndexOf"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public int IndexOf(XmlArrayItemAttribute value)
 {
     return(_list.IndexOf(value));
 }
Example #36
0
 /// <include file='doc\XmlArrayItemAttributes.uex' path='docs/doc[@for="XmlArrayItemAttributes.CopyTo"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public void CopyTo(XmlArrayItemAttribute[] array, int index)
 {
     _list.CopyTo(array, index);
 }
Example #37
0
 /// <include file='doc\XmlArrayItemAttributes.uex' path='docs/doc[@for="XmlArrayItemAttributes.Contains"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public bool Contains(XmlArrayItemAttribute value)
 {
     return(_list.Contains(value));
 }
Example #38
0
		public int Add (XmlArrayItemAttribute attribute)
		{
			return (List as IList).Add (attribute);
		}
 /// <include file='doc\XmlArrayItemAttributes.uex' path='docs/doc[@for="XmlArrayItemAttributes.Add"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public int Add(XmlArrayItemAttribute attribute)
 {
     return(List.Add(attribute));
 }
Example #40
0
 /// <include file='doc\XmlArrayItemAttributes.uex' path='docs/doc[@for="XmlArrayItemAttributes.Contains"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public bool Contains(XmlArrayItemAttribute value)
 {
     return _list.Contains(value);
 }
		public void DifferentNestingLevels()
		{
			XmlArrayItemAttribute array1 = new XmlArrayItemAttribute("myname", typeof(SerializeMe));
			array1.NestingLevel = 1;
			XmlArrayItemAttribute array2 = new XmlArrayItemAttribute("myname", typeof(SerializeMe));
			array2.NestingLevel = 2;

			atts1.XmlArrayItems.Add(array1);
			atts2.XmlArrayItems.Add(array2);

			ov1.Add(typeof(SerializeMe), atts1);
			ov2.Add(typeof(SerializeMe), atts2);

			ThumbprintHelpers.DifferentThumbprint(ov1, ov2);
		}