CustomReflectionContext.CreateProperty Method (Type, String, Func(Of Object, Object), Action(Of Object, Object), IEnumerable(Of Attribute), IEnumerable(Of Attribute), IEnumerable(Of Attribute))

.NET Framework (current version)
 

Creates an object that represents a property to be added to a type, to be used with the AddProperties method and using the specified custom attributes.

Namespace:   System.Reflection.Context
Assembly:  System.Reflection.Context (in System.Reflection.Context.dll)

Protected Function CreateProperty (
	propertyType As Type,
	name As String,
	getter As Func(Of Object, Object),
	setter As Action(Of Object, Object),
	propertyCustomAttributes As IEnumerable(Of Attribute),
	getterCustomAttributes As IEnumerable(Of Attribute),
	setterCustomAttributes As IEnumerable(Of Attribute)
) As PropertyInfo

Parameters

propertyType
Type: System.Type

The type of the property to create.

name
Type: System.String

The name of the property to create.

getter
Type: System.Func(Of Object, Object)

An object that represents the property's get accessor.

setter
Type: System.Action(Of Object, Object)

An object that represents the property's set accessor.

propertyCustomAttributes
Type: System.Collections.Generic.IEnumerable(Of Attribute)

A collection of custom attributes to apply to the property.

getterCustomAttributes
Type: System.Collections.Generic.IEnumerable(Of Attribute)

A collection of custom attributes to apply to the property's get accessor.

setterCustomAttributes
Type: System.Collections.Generic.IEnumerable(Of Attribute)

A collection of custom attributes to apply to the property's set accessor.

Return Value

Type: System.Reflection.PropertyInfo

An object that represents the property.

Objects that are returned by this method are not complete PropertyInfo objects, and should be used only in the context of the AddProperties method.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.5
Portable Class Library
Supported in: portable .NET platforms
Return to top
Show: