/// <summary>
 ///     <para>
 ///       Initializes a new instance of <see cref='.AttributeSectionCollection'/> based on another <see cref='.AttributeSectionCollection'/>.
 ///    </para>
 /// </summary>
 /// <param name='value'>
 ///       A <see cref='.AttributeSectionCollection'/> from which the contents are copied
 /// </param>
 public AttributeSectionCollection(AttributeSectionCollection value)
 {
     this.AddRange(value);
 }
 /// <summary>
 ///     <para>
 ///       Adds the contents of another <see cref='.AttributeSectionCollection'/> to the end of the collection.
 ///    </para>
 /// </summary>
 /// <param name='value'>
 ///    A <see cref='.AttributeSectionCollection'/> containing the objects to add to the collection.
 /// </param>
 /// <returns>
 ///   <para>None.</para>
 /// </returns>
 /// <seealso cref='.AttributeSectionCollection.Add'/>
 public void AddRange(AttributeSectionCollection value)
 {
     for (int i = 0; (i < value.Count); i = (i + 1)) {
         this.Add(value[i]);
     }
 }
 public AttributeSectionEnumerator(AttributeSectionCollection mappings)
 {
     this.temp = ((IEnumerable)(mappings));
     this.baseEnumerator = temp.GetEnumerator();
 }
예제 #4
0
 AttributeSectionCollection VisitAttributes(ArrayList attributes)
 {
     // TODO Expressions???
     AttributeSectionCollection result = new AttributeSectionCollection();
     foreach (AST.AttributeSection section in attributes) {
         AttributeCollection resultAttributes = new AttributeCollection();
         foreach (AST.Attribute attribute in section.Attributes) {
             IAttribute a = new ASTAttribute(attribute.Name, new ArrayList(attribute.PositionalArguments), new SortedList());
             foreach (AST.NamedArgument n in attribute.NamedArguments) {
                 a.NamedArguments[n.Name] = n.Expr;
             }
         }
         IAttributeSection s = new AttributeSection((AttributeTarget)Enum.Parse(typeof (AttributeTarget), section.AttributeTarget), resultAttributes);
     }
     return null;
 }