MemberInfo

Namespace: ASPSecurityKit.Authorization
Assembly: ASPSecurityKit.dll

Summary

Represents metadata about a member being evaluated by EntityIdAuthorizer<TIdMemberReference> during object tree traversal.

Constructors

#ctor(value)

Summary

Initializes a new instance of the MemberInfo class, representing an IsObject member.

Parameters
Name Type Description
value System.Object The object value.
Exceptions
Type Description
System.ArgumentNullException When value is null.

#ctor(parameter,value)

Summary

Initializes a new instance of the MemberInfo class, representing a method parameter member.

Parameters
Name Type Description
parameter System.Reflection.ParameterInfo The method parameter.
value System.Object The parameter value.
Exceptions
Type Description
System.ArgumentNullException When parameter or value is null.

#ctor(property,value)

Summary

Initializes a new instance of the MemberInfo class, representing a property member.

Parameters
Name Type Description
property System.Reflection.PropertyInfo The property.
value System.Object The property value.
Exceptions
Type Description
System.ArgumentNullException When property or value is null.

Properties

IsParameter

Summary

Gets a value indicating whether this instance represents a method parameter.

Value

true if this instance represents a method parameter; otherwise, false.

IsProperty

Summary

Gets a value indicating whether this instance represents a property.

Value

true if this instance represents a property; otherwise, false.

IsObject

Summary

Gets a value indicating whether this instance represents an object (which is neither a property or a method parameter). This is generally used in case of request DTOs or an object item in a collection.

Value

true if this instance represents an object; otherwise, false.

Parameter

Summary

Gets the ParameterInfo instance represented by this member.

Value

The ParameterInfo instance represented by this member.

Property

Summary

Gets the PropertyInfo instance represented by this member.

Value

The PropertyInfo instance represented by this member.

Value

Summary

Gets the value for the current member represented by this instance.

Value

The value as Object for the current member represented by this instance.

Name

Summary

Gets the name of the Parameter or Property or empty string if it IsObject.

Value

The name of the Parameter or Property or empty string if it IsObject.

ParentName

Summary

Gets or sets the name of the parent container object for this member. If provided, can be used for prefixing member name that has only ‘Id’ to locate the right related references provider.

Value

The name of the parent container object for this member.

Methods

IsDefined<TAttribute>()

Summary

Determines whether the member represented by this instance has the specified attribute defined. In case of IsObject members, it’s always false as there’s no metadata representing an object member.

Returns

true if the member represented by this instance has the specified attribute defined; otherwise, false.

Parameters

This method has no parameters.

Generic Types
Name Description
TAttribute Type of the attribute.

Get<TAttribute>()

Summary

Gets the specified attribute if defined for the member represented by this instance. In case of IsObject members, it’s always null as there’s no metadata representing an object member.

Returns

A Attribute of TAttribute type, if defined for the member represented by this instance or null.

Parameters

This method has no parameters.

Generic Types
Name Description
TAttribute Type of the attribute.