Example #1
0
        public void TestICollectionCopyTo()
        {
            SynchronizedReadOnlyCollection <int> c = new SynchronizedReadOnlyCollection <int> ();
            Array a = Array.CreateInstance(typeof(String), 10);

            ((ICollection)c).CopyTo(a, 0);
        }
		public void TestICollectionCopyTo ()
		{
			SynchronizedReadOnlyCollection<int> c = new SynchronizedReadOnlyCollection<int> ();
			Array a = Array.CreateInstance (typeof (String), 10);

			((ICollection) c).CopyTo (a, 0);
		}
		public void TestIListContainsNull ()
		{                        
			ObjectList c = new ObjectList ();
			Assert.IsFalse (((IList) c).Contains (null));

			SynchronizedReadOnlyCollection<ValueType> d = new SynchronizedReadOnlyCollection<ValueType> ();
			Assert.IsFalse (((IList) d).Contains (null));
		}
Example #4
0
        public void TestIListContainsNull()
        {
            ObjectList c = new ObjectList();

            Assert.IsFalse(((IList)c).Contains(null));

            SynchronizedReadOnlyCollection <ValueType> d = new SynchronizedReadOnlyCollection <ValueType> ();

            Assert.IsFalse(((IList)d).Contains(null));
        }
            internal static FaultException.FaultReasonData[] GetObjectData(FaultReason reason)
            {
                SynchronizedReadOnlyCollection <FaultReasonText> translations = reason.Translations;

                FaultException.FaultReasonData[] dataArray = new FaultException.FaultReasonData[translations.Count];
                for (int i = 0; i < translations.Count; i++)
                {
                    dataArray[i]         = new FaultException.FaultReasonData();
                    dataArray[i].xmlLang = translations[i].XmlLang;
                    dataArray[i].text    = translations[i].Text;
                }
                return(dataArray);
            }
Example #6
0
            internal static FaultReasonData[] GetObjectData(FaultReason reason)
            {
                SynchronizedReadOnlyCollection<FaultReasonText> translations = reason.Translations;
                FaultReasonData[] array = new FaultReasonData[translations.Count];

                for (int i = 0; i < translations.Count; i++)
                {
                    array[i] = new FaultReasonData();
                    array[i]._xmlLang = translations[i].XmlLang;
                    array[i]._text = translations[i].Text;
                }

                return array;
            }
 private void Init(FaultReasonText[] translations)
 {
     this.translations = new SynchronizedReadOnlyCollection<FaultReasonText>(new object(), Array.AsReadOnly<FaultReasonText>(translations));
 }
 private void Init(FaultReasonText[] translations)
 {
     this.translations = new SynchronizedReadOnlyCollection <FaultReasonText>(new object(), Array.AsReadOnly <FaultReasonText>(translations));
 }
Example #9
0
 private void Init(FaultReasonText[] translations)
 {
     Translations = new SynchronizedReadOnlyCollection <FaultReasonText>(new object(), new ReadOnlyCollection <FaultReasonText>(translations));
 }
Example #10
0
        public void TestIListContainsWrongType()
        {
            SynchronizedReadOnlyCollection <int> c = new SynchronizedReadOnlyCollection <int> ();

            ((IList)c).Contains("foo");
        }
Example #11
0
        public void TestIListIndexOf()
        {
            SynchronizedReadOnlyCollection <int> c = new SynchronizedReadOnlyCollection <int> ();

            ((IList)c).IndexOf("foo");
        }
Example #12
0
 private void Init(FaultReasonText[] translations)
 {
     _translations = new SynchronizedReadOnlyCollection<FaultReasonText>(new object(), new ReadOnlyCollection<FaultReasonText>(translations));
 }
		public void TestIListContainsWrongType()
		{
			SynchronizedReadOnlyCollection<int> c = new SynchronizedReadOnlyCollection<int> ();

			((IList) c).Contains ("foo");
		}
		public void TestIListIndexOf ()
		{
			SynchronizedReadOnlyCollection<int> c = new SynchronizedReadOnlyCollection<int> ();

			((IList) c).IndexOf ("foo");
		}