PostSharp SDK6.7//Post­Sharp.​Sdk.​Code­Model.​Collections Namespace/Element­Collection­Extensions Class/Element­Collection­Extensions Methods/Element­Collection­Extensions.​Add­Range­Cloned(T) Method

ElementCollectionExtensions.AddRangeCloned<T> Method

Adds clones of items of a given collection to the current collection.

Namespace:  PostSharp.Sdk.CodeModel.Collections
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.7.10.0 (6.7.10.0)
Syntax
C#
public static void AddRangeCloned<T>(
	this ElementCollection<T> collection,
	ICollection<T> items
)
where T : Element, ICloneable

Parameters

collection
Type: PostSharp.Sdk.CodeModel.Collections.ElementCollection<T>

[Missing <param name="collection"/> documentation for "M:PostSharp.Sdk.CodeModel.Collections.ElementCollectionExtensions.AddRangeCloned``1(PostSharp.Sdk.CodeModel.Collections.ElementCollection{``0},System.Collections.Generic.ICollection{``0})"]

items
Type: System.Collections.Generic.ICollection<T>
The collection of items to be added.

Type Parameters

T

[Missing <typeparam name="T"/> documentation for "M:PostSharp.Sdk.CodeModel.Collections.ElementCollectionExtensions.AddRangeCloned``1(PostSharp.Sdk.CodeModel.Collections.ElementCollection{``0},System.Collections.Generic.ICollection{``0})"]

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ElementCollection<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
This method requires T to implement the ICloneable interface. Clones should be themselves of the T type.
See Also