Beispiel #1
0
 /// <summary>
 /// Adds an object to the end of the CollectionBase.
 /// </summary>
 /// <param name="value">The Object to be added to the end of the CollectionBase. </param>
 /// <returns>The CollectionBase index at which the value has been added.</returns>
 public override sealed int Add(SubjectElementReadWrite value)
 {
     if (value == null)
     {
         throw new ArgumentNullException("value");
     }
     return(List.Add(new SubjectElement(value.SubjectCategory, new AttributeCollection(value.Attributes), value.SchemaVersion)));
 }
 /// <summary>
 /// Gets the index of the given SubjectElementReadWrite in the collection
 /// </summary>
 /// <param name="subject"></param>
 /// <returns></returns>
 public int GetIndex(SubjectElementReadWrite subject)
 {
     for (var i = 0; i < this.Count; i++)
     {
         if (this.List[i] == subject)
         {
             return(i);
         }
     }
     return(-1);
 }
 /// <summary>
 /// Gets the index of the given SubjectElementReadWrite in the collection
 /// </summary>
 /// <param name="subject"></param>
 /// <returns></returns>
 public int GetIndex(SubjectElementReadWrite subject)
 {
     for (var i = 0; i < this.Count; i++)
     {
         if (this.List[i] == subject)
         {
             return i;
         }
     }
     return -1;
 }
Beispiel #4
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="subject"></param>
        public Subject( con.SubjectElementReadWrite subject )
        {
            _subject = subject;

            this.Text = "Subject";
            this.SelectedImageIndex = 2;
            this.ImageIndex = 2;

            foreach( con.AttributeElementReadWrite attr in _subject.Attributes )
            {
                this.Nodes.Add( new Attribute( attr ) );
            }
        }
Beispiel #5
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="subject"></param>
        public Subject(con.SubjectElementReadWrite subject)
        {
            _subject = subject;

            this.Text = "Subject";
            this.SelectedImageIndex = 2;
            this.ImageIndex         = 2;

            foreach (con.AttributeElementReadWrite attr in _subject.Attributes)
            {
                this.Nodes.Add(new Attribute(attr));
            }
        }
 /// <summary>
 /// Adds an object to the end of the CollectionBase.
 /// </summary>
 /// <param name="value">The Object to be added to the end of the CollectionBase. </param>
 /// <returns>The CollectionBase index at which the value has been added.</returns>
 public override sealed int Add(SubjectElementReadWrite value)
 {
     if (value == null) throw new ArgumentNullException("value");
     return (List.Add(new SubjectElement(value.SubjectCategory, new AttributeCollection(value.Attributes), value.SchemaVersion)));
 }
 /// <summary>
 /// Adds an object to the end of the CollectionBase.
 /// </summary>
 /// <param name="value">The Object to be added to the end of the CollectionBase. </param>
 /// <returns>The CollectionBase index at which the value has been added.</returns>
 public virtual int Add(SubjectElementReadWrite value)
 {
     return(List.Add(value));
 }
 /// <summary>
 /// Adds an object to the end of the CollectionBase.
 /// </summary>
 /// <param name="value">The Object to be added to the end of the CollectionBase. </param>
 /// <returns>The CollectionBase index at which the value has been added.</returns>
 public virtual int Add(SubjectElementReadWrite value)
 {
     return (List.Add(value));
 }