Uredi

Deli z drugimi prek


XamlMember Constructors

Definition

Initializes a new instance of the XamlMember class.

Overloads

XamlMember(EventInfo, XamlSchemaContext)

Initializes a new instance of the XamlMember class using CLR type system EventInfo and a XamlSchemaContext.

XamlMember(PropertyInfo, XamlSchemaContext)

Initializes a new instance of the XamlMember class using CLR type system PropertyInfo and a XamlSchemaContext.

XamlMember(EventInfo, XamlSchemaContext, XamlMemberInvoker)

Initializes a new instance of the XamlMember class using CLR type system EventInfo and a XamlSchemaContext, including XamlMemberInvoker information.

XamlMember(PropertyInfo, XamlSchemaContext, XamlMemberInvoker)

Initializes a new instance of the XamlMember class using reflection PropertyInfo and a XamlSchemaContext, including XamlMemberInvoker information.

XamlMember(String, MethodInfo, XamlSchemaContext)

Initializes a new instance of the XamlMember class for a XamlMember that represents an attachable event.

XamlMember(String, XamlType, Boolean)

Initializes a new instance of the XamlMember class using a string name and declaring XamlType information. A XamlMember that is constructed with this signature has significant limitations.

XamlMember(String, MethodInfo, MethodInfo, XamlSchemaContext)

Initializes a new instance of the XamlMember class for a XamlMember that represents an attachable property.

XamlMember(String, MethodInfo, XamlSchemaContext, XamlMemberInvoker)

Initializes a new instance of the XamlMember class for a XamlMember that represents an attachable event, including XamlMemberInvoker information.

XamlMember(String, MethodInfo, MethodInfo, XamlSchemaContext, XamlMemberInvoker)

Initializes a new instance of the XamlMember class for a XamlMember that represents an attachable property, including XamlMemberInvoker information.

XamlMember(EventInfo, XamlSchemaContext)

Initializes a new instance of the XamlMember class using CLR type system EventInfo and a XamlSchemaContext.

public:
 XamlMember(System::Reflection::EventInfo ^ eventInfo, System::Xaml::XamlSchemaContext ^ schemaContext);
public XamlMember (System.Reflection.EventInfo eventInfo, System.Xaml.XamlSchemaContext schemaContext);
new System.Xaml.XamlMember : System.Reflection.EventInfo * System.Xaml.XamlSchemaContext -> System.Xaml.XamlMember
Public Sub New (eventInfo As EventInfo, schemaContext As XamlSchemaContext)

Parameters

eventInfo
EventInfo

The CLR type system EventInfo that represents the event member.

schemaContext
XamlSchemaContext

The XamlSchemaContext context that qualifies the member.

Remarks

Use this constructor if the member represents an event (event handler connection-point property).

Applies to

XamlMember(PropertyInfo, XamlSchemaContext)

Initializes a new instance of the XamlMember class using CLR type system PropertyInfo and a XamlSchemaContext.

public:
 XamlMember(System::Reflection::PropertyInfo ^ propertyInfo, System::Xaml::XamlSchemaContext ^ schemaContext);
public XamlMember (System.Reflection.PropertyInfo propertyInfo, System.Xaml.XamlSchemaContext schemaContext);
new System.Xaml.XamlMember : System.Reflection.PropertyInfo * System.Xaml.XamlSchemaContext -> System.Xaml.XamlMember
Public Sub New (propertyInfo As PropertyInfo, schemaContext As XamlSchemaContext)

Parameters

propertyInfo
PropertyInfo

The CLR type system PropertyInfo that represents the property member.

schemaContext
XamlSchemaContext

The XamlSchemaContext context that qualifies the member.

Remarks

Use this constructor if the member represents a property (and specifically is not an event handler connection).

Applies to

XamlMember(EventInfo, XamlSchemaContext, XamlMemberInvoker)

Initializes a new instance of the XamlMember class using CLR type system EventInfo and a XamlSchemaContext, including XamlMemberInvoker information.

public:
 XamlMember(System::Reflection::EventInfo ^ eventInfo, System::Xaml::XamlSchemaContext ^ schemaContext, System::Xaml::Schema::XamlMemberInvoker ^ invoker);
public XamlMember (System.Reflection.EventInfo eventInfo, System.Xaml.XamlSchemaContext schemaContext, System.Xaml.Schema.XamlMemberInvoker invoker);
new System.Xaml.XamlMember : System.Reflection.EventInfo * System.Xaml.XamlSchemaContext * System.Xaml.Schema.XamlMemberInvoker -> System.Xaml.XamlMember
Public Sub New (eventInfo As EventInfo, schemaContext As XamlSchemaContext, invoker As XamlMemberInvoker)

Parameters

eventInfo
EventInfo

The CLR type system EventInfo that represents the event member.

schemaContext
XamlSchemaContext

The XamlSchemaContext context that qualifies the member.

invoker
XamlMemberInvoker

The XamlMemberInvoker implementation that handles run-time reflection calls against the XamlMember.

Remarks

Use this constructor if the member represents an event (or an event handler connection-point property).

Applies to

XamlMember(PropertyInfo, XamlSchemaContext, XamlMemberInvoker)

Initializes a new instance of the XamlMember class using reflection PropertyInfo and a XamlSchemaContext, including XamlMemberInvoker information.

public:
 XamlMember(System::Reflection::PropertyInfo ^ propertyInfo, System::Xaml::XamlSchemaContext ^ schemaContext, System::Xaml::Schema::XamlMemberInvoker ^ invoker);
public XamlMember (System.Reflection.PropertyInfo propertyInfo, System.Xaml.XamlSchemaContext schemaContext, System.Xaml.Schema.XamlMemberInvoker invoker);
new System.Xaml.XamlMember : System.Reflection.PropertyInfo * System.Xaml.XamlSchemaContext * System.Xaml.Schema.XamlMemberInvoker -> System.Xaml.XamlMember
Public Sub New (propertyInfo As PropertyInfo, schemaContext As XamlSchemaContext, invoker As XamlMemberInvoker)

Parameters

propertyInfo
PropertyInfo

The CLR type system PropertyInfo that represents the property member.

schemaContext
XamlSchemaContext

The XamlSchemaContext context that qualifies the member.

invoker
XamlMemberInvoker

The XamlMemberInvoker implementation that handles run-time invocation calls against the XamlMember.

Remarks

Use this constructor only if the member represents a property and if it is not an event handler connection.

Applies to

XamlMember(String, MethodInfo, XamlSchemaContext)

Initializes a new instance of the XamlMember class for a XamlMember that represents an attachable event.

public:
 XamlMember(System::String ^ attachableEventName, System::Reflection::MethodInfo ^ adder, System::Xaml::XamlSchemaContext ^ schemaContext);
public XamlMember (string attachableEventName, System.Reflection.MethodInfo adder, System.Xaml.XamlSchemaContext schemaContext);
new System.Xaml.XamlMember : string * System.Reflection.MethodInfo * System.Xaml.XamlSchemaContext -> System.Xaml.XamlMember
Public Sub New (attachableEventName As String, adder As MethodInfo, schemaContext As XamlSchemaContext)

Parameters

attachableEventName
String

The string name of the attachable event.

adder
MethodInfo

The CLR type system MethodInfo for the handler Add method of the attachable member's backing implementation.

schemaContext
XamlSchemaContext

The XamlSchemaContext context that qualifies the member.

Remarks

Use this constructor if the member represents an attachable event member.

Applies to

XamlMember(String, XamlType, Boolean)

Initializes a new instance of the XamlMember class using a string name and declaring XamlType information. A XamlMember that is constructed with this signature has significant limitations.

public:
 XamlMember(System::String ^ name, System::Xaml::XamlType ^ declaringType, bool isAttachable);
public XamlMember (string name, System.Xaml.XamlType declaringType, bool isAttachable);
new System.Xaml.XamlMember : string * System.Xaml.XamlType * bool -> System.Xaml.XamlMember
Public Sub New (name As String, declaringType As XamlType, isAttachable As Boolean)

Parameters

name
String

The string name of the member.

declaringType
XamlType

The XamlType information for the declaring type.

isAttachable
Boolean

true to indicate that the member is attachable; otherwise, false.

Exceptions

name or declaringType is null.

Remarks

A XamlMember that is constructed with the XamlMember(String, XamlType, Boolean) signature returns true for IsUnknown.

For a load path that involves XamlObjectWriter, such a member cannot be written into an object graph. Using the .NET Framework XAML Services implementation, the XamlObjectWriter.WriteStartMember call throws a XamlObjectWriterException when the relevant XamlMember reports true for IsUnknown.

You should not construct a XamlMember with IsUnknown true unless your implementation can handle the exceptions from XamlObjectWriter, or you have other ways to adjust the XamlObjectWriter behavior. For example, one or more of the following might be true of your implementation:

Applies to

XamlMember(String, MethodInfo, MethodInfo, XamlSchemaContext)

Initializes a new instance of the XamlMember class for a XamlMember that represents an attachable property.

public:
 XamlMember(System::String ^ attachablePropertyName, System::Reflection::MethodInfo ^ getter, System::Reflection::MethodInfo ^ setter, System::Xaml::XamlSchemaContext ^ schemaContext);
public XamlMember (string attachablePropertyName, System.Reflection.MethodInfo getter, System.Reflection.MethodInfo setter, System.Xaml.XamlSchemaContext schemaContext);
new System.Xaml.XamlMember : string * System.Reflection.MethodInfo * System.Reflection.MethodInfo * System.Xaml.XamlSchemaContext -> System.Xaml.XamlMember
Public Sub New (attachablePropertyName As String, getter As MethodInfo, setter As MethodInfo, schemaContext As XamlSchemaContext)

Parameters

attachablePropertyName
String

The string name of the attachable property.

getter
MethodInfo

The CLR type system MethodInfo for the get accessor of the attachable member's backing implementation.

setter
MethodInfo

The CLR type system MethodInfo for the set accessor of the attachable member's backing implementation.

schemaContext
XamlSchemaContext

The XamlSchemaContext context that qualifies the member.

Remarks

Use this constructor if the member represents an attachable property.

Applies to

XamlMember(String, MethodInfo, XamlSchemaContext, XamlMemberInvoker)

Initializes a new instance of the XamlMember class for a XamlMember that represents an attachable event, including XamlMemberInvoker information.

public:
 XamlMember(System::String ^ attachableEventName, System::Reflection::MethodInfo ^ adder, System::Xaml::XamlSchemaContext ^ schemaContext, System::Xaml::Schema::XamlMemberInvoker ^ invoker);
public XamlMember (string attachableEventName, System.Reflection.MethodInfo adder, System.Xaml.XamlSchemaContext schemaContext, System.Xaml.Schema.XamlMemberInvoker invoker);
new System.Xaml.XamlMember : string * System.Reflection.MethodInfo * System.Xaml.XamlSchemaContext * System.Xaml.Schema.XamlMemberInvoker -> System.Xaml.XamlMember
Public Sub New (attachableEventName As String, adder As MethodInfo, schemaContext As XamlSchemaContext, invoker As XamlMemberInvoker)

Parameters

attachableEventName
String

The string name of the attachable event.

adder
MethodInfo

The CLR type system MethodInfo for the handler Add method of the attachable member's backing implementation.

schemaContext
XamlSchemaContext

The XamlSchemaContext context that qualifies the member.

invoker
XamlMemberInvoker

The XamlMemberInvoker implementation that handles run-time invocation calls against the XamlMember.

Remarks

Use this constructor if the member represents an attachable event member.

Applies to

XamlMember(String, MethodInfo, MethodInfo, XamlSchemaContext, XamlMemberInvoker)

Initializes a new instance of the XamlMember class for a XamlMember that represents an attachable property, including XamlMemberInvoker information.

public:
 XamlMember(System::String ^ attachablePropertyName, System::Reflection::MethodInfo ^ getter, System::Reflection::MethodInfo ^ setter, System::Xaml::XamlSchemaContext ^ schemaContext, System::Xaml::Schema::XamlMemberInvoker ^ invoker);
public XamlMember (string attachablePropertyName, System.Reflection.MethodInfo getter, System.Reflection.MethodInfo setter, System.Xaml.XamlSchemaContext schemaContext, System.Xaml.Schema.XamlMemberInvoker invoker);
new System.Xaml.XamlMember : string * System.Reflection.MethodInfo * System.Reflection.MethodInfo * System.Xaml.XamlSchemaContext * System.Xaml.Schema.XamlMemberInvoker -> System.Xaml.XamlMember
Public Sub New (attachablePropertyName As String, getter As MethodInfo, setter As MethodInfo, schemaContext As XamlSchemaContext, invoker As XamlMemberInvoker)

Parameters

attachablePropertyName
String

The string name of the attachable property.

getter
MethodInfo

The CLR type system MethodInfo for the get accessor of the attachable member's backing implementation.

setter
MethodInfo

The CLR type system MethodInfo for the set accessor of the attachable member's backing implementation.

schemaContext
XamlSchemaContext

The XamlSchemaContext context that qualifies the member.

invoker
XamlMemberInvoker

The XamlMemberInvoker implementation that handles run-time invocation calls against the XamlMember.

Remarks

Use this constructor if the member represents an attachable property member.

Applies to