public void AddAttribute (AttributeCodeElement attribute) {
			AttributeCodeElement existingAttribute = Attributes.Find ((a) => a.Name == attribute.Name);
			if (existingAttribute != null) {
				Attributes.Remove (existingAttribute);
			}
			Attributes.Add (attribute);
		}
Ejemplo n.º 2
0
 /// <summary>
 /// Adds the given attribute to all methods, fields, constructors and properties.
 /// </summary>
 /// <param name="attribute">Attribute.</param>
 public void AddAttributeToAllMembers(AttributeCodeElement attribute)
 {
     Constructors.ForEach((c) => c.AddAttribute(attribute));
     Methods.ForEach((c) => c.AddAttribute(attribute));
     Properties.ForEach((c) => c.AddAttribute(attribute));
     Fields.ForEach((c) => c.AddAttribute(attribute));
 }
Ejemplo n.º 3
0
        public void AddAttribute(AttributeCodeElement attribute)
        {
            AttributeCodeElement existingAttribute = Attributes.Find((a) => a.Name == attribute.Name);

            if (existingAttribute != null)
            {
                Attributes.Remove(existingAttribute);
            }
            Attributes.Add(attribute);
        }
Ejemplo n.º 4
0
		/// <summary>
		/// Adds the given attribute to all methods, fields, constructors and properties.
		/// </summary>
		/// <param name="attribute">Attribute.</param>
		public void AddAttributeToAllMembers (AttributeCodeElement attribute) {
			Constructors.ForEach ((c) => c.AddAttribute (attribute));
			Methods.ForEach ((c) => c.AddAttribute (attribute));
			Properties.ForEach ((c) => c.AddAttribute (attribute));
			Fields.ForEach ((c) => c.AddAttribute (attribute));
		}