Skip to content

M_CommandLine_Core_ReflectionExtensions_SetProperties__1

Moh.Hassan edited this page Oct 10, 2019 · 1 revision

ReflectionExtensions.SetProperties(T) Method

Namespace: CommandLine.Core
Assembly: CommandLine (in CommandLine.dll) Version: 0.0.0

Syntax

C#

public static IEnumerable<Error> SetProperties<T>(
	this T instance,
	IEnumerable<SpecificationProperty> specProps,
	Func<SpecificationProperty, bool> predicate,
	Func<SpecificationProperty, Object> selector
)

VB

<ExtensionAttribute>
Public Shared Function SetProperties(Of T) ( 
	instance As T,
	specProps As IEnumerable(Of SpecificationProperty),
	predicate As Func(Of SpecificationProperty, Boolean),
	selector As Func(Of SpecificationProperty, Object)
) As IEnumerable(Of Error)

C++

public:
[ExtensionAttribute]
generic<typename T>
static IEnumerable<Error^>^ SetProperties(
	T instance, 
	IEnumerable<SpecificationProperty^>^ specProps, 
	Func<SpecificationProperty^, bool>^ predicate, 
	Func<SpecificationProperty^, Object^>^ selector
)

F#

[<ExtensionAttribute>]
static member SetProperties : 
        instance : 'T * 
        specProps : IEnumerable<SpecificationProperty> * 
        predicate : Func<SpecificationProperty, bool> * 
        selector : Func<SpecificationProperty, Object> -> IEnumerable<Error> 

Parameters

 

instance
Type: T
specProps
Type: System.Collections.Generic.IEnumerable(SpecificationProperty)
predicate
Type: System.Func(SpecificationProperty, Boolean)
selector
Type: System.Func(SpecificationProperty, Object)

Type Parameters

 

T

Return Value

Type: IEnumerable(Error)

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . 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).

See Also

Reference

ReflectionExtensions Class
CommandLine.Core Namespace

Clone this wiki locally