IEnumerableExtensionSetPreferencesTSource Method
Sets the
Preference properties of
the items in a
VCardProperty collection depending on their position
in that collection and allows to specify whether to skip empty items in that process.
(The first item gets the highest preference
1.)
Namespace: FolkerKinzel.VCards.ExtensionsAssembly: FolkerKinzel.VCards (in FolkerKinzel.VCards.dll) Version: 8.0.1+a91cc3f0fd39aeb548e16006a60ca9dd10a304a2
public static void SetPreferences<TSource>(
this IEnumerable<TSource>? values,
bool skipEmptyItems = true
)
where TSource : VCardProperty, IEnumerable<TSource>
<ExtensionAttribute>
Public Shared Sub SetPreferences(Of TSource As {VCardProperty, IEnumerable(Of TSource)}) (
values As IEnumerable(Of TSource),
Optional skipEmptyItems As Boolean = true
)
public:
[ExtensionAttribute]
generic<typename TSource>
where TSource : VCardProperty, IEnumerable<TSource>
static void SetPreferences(
IEnumerable<TSource>^ values,
bool skipEmptyItems = true
)
[<ExtensionAttribute>]
static member SetPreferences :
values : IEnumerable<'TSource> *
?skipEmptyItems : bool
(* Defaults:
let _skipEmptyItems = defaultArg skipEmptyItems true
*)
-> unit when 'TSource : VCardProperty and IEnumerable<'TSource>
- values IEnumerableTSource
- An IEnumerableT of VCardProperty
objects. The collection may be null, empty, or may contain null
references.
- skipEmptyItems Boolean (Optional)
- true to give empty VCardProperty
objects always the lowest Preference (100), independently
of their position in the collection, or false to treat empty VCardProperty
objects like any other. (null references are always skipped.)
- TSource
- Generic type parameter that's constrained to be a class that's
derived from VCardProperty.
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableTSource. 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).