Show / Hide Table of Contents

Class ExtensionMethodsForAttachedProperties

Extension methods that assist or enable functionality found within the extension model namespace for attached properties (ExtendedXmlSerializer.ExtensionModel.AttachedProperties).

Inheritance
System.Object
ExtensionMethodsForAttachedProperties
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ExtendedXmlSerializer
Assembly: ExtendedXmlSerializer.dll
Syntax
public static class ExtensionMethodsForAttachedProperties

Methods

AttachedProperty<TType, TValue>(IConfigurationContainer, Expression<Func<Property<TType, TValue>>>)

Registers an attached property by expression.

Declaration
public static IMemberConfiguration<TType, TValue> AttachedProperty<TType, TValue>(this IConfigurationContainer this, Expression<Func<Property<TType, TValue>>> property)
Parameters
IConfigurationContainer this

The container to configure.

System.Linq.Expressions.Expression<System.Func<Property<TType, TValue>>> property

The expression that resolves to an attached property.

Returns
IMemberConfiguration<TType, TValue>

The configured IMemberConfiguration that represents the attached property.

Type Parameters
TType

The type of object the attached property targets.

TValue

The type of the value the attached property provides.

AttachedProperty<TType, TValue>(IConfigurationContainer, Expression<Func<Property<TType, TValue>>>, Action<IMemberConfiguration<TType, TValue>>)

This method is not used and will be removed in a future release.

Declaration
[Obsolete("This method is not used and will be removed in a future release.")]
public static IConfigurationContainer AttachedProperty<TType, TValue>(this IConfigurationContainer this, Expression<Func<Property<TType, TValue>>> property, Action<IMemberConfiguration<TType, TValue>> configure)
Parameters
IConfigurationContainer this

System.Linq.Expressions.Expression<System.Func<Property<TType, TValue>>> property

System.Action<IMemberConfiguration<TType, TValue>> configure

Returns
IConfigurationContainer

Type Parameters
TType

TValue

EnableAttachedProperties(IConfigurationContainer, IProperty[])

Enables attached properties on the container with optional initial properties to register.

Declaration
public static IConfigurationContainer EnableAttachedProperties(this IConfigurationContainer this, params IProperty[] properties)
Parameters
IConfigurationContainer this

The container to configure.

IProperty[] properties

The properties to register with the container.

Returns
IConfigurationContainer

The configured IConfigurationContainer.

EnableAttachedProperties(IConfigurationContainer, ICollection<IProperty>)

Enables attached properties on the container with the initial properties to register.

Declaration
public static IConfigurationContainer EnableAttachedProperties(this IConfigurationContainer this, ICollection<IProperty> properties)
Parameters
IConfigurationContainer this

The container to configure.

System.Collections.Generic.ICollection<IProperty> properties

The properties to register with the container.

Returns
IConfigurationContainer

The configured IConfigurationContainer.

EnableAttachedProperties(IConfigurationContainer, ICollection<IProperty>, ICollection<Type>)

Declaration
[Obsolete("This method is deprecated and will be removed in a future release.")]
public static IConfigurationContainer EnableAttachedProperties(this IConfigurationContainer this, ICollection<IProperty> properties, ICollection<Type> types)
Parameters
IConfigurationContainer this

System.Collections.Generic.ICollection<IProperty> properties

System.Collections.Generic.ICollection<System.Type> types

Returns
IConfigurationContainer

Get<TType, TValue>(TType, Property<TType, TValue>)

Given an instance, gets the value stored with the attached property.

Declaration
public static TValue Get<TType, TValue>(this TType this, Property<TType, TValue> property)
Parameters
TType this

The instance to use to retrieve the value.

Property<TType, TValue> property

The property used to retrieve the value.

Returns
TValue

The value stored with the attached property.

Type Parameters
TType

The instance type.

TValue

The stored value type.

Set<TType, TValue>(TType, Property<TType, TValue>, TValue)

Given an instance and value, stores a value with the attached property.

Declaration
public static void Set<TType, TValue>(this TType this, Property<TType, TValue> property, TValue value)
Parameters
TType this

The instance with which to store the value.

Property<TType, TValue> property

The attached property to store the value.

TValue value

The value to store.

Type Parameters
TType

The instance type.

TValue

The stored value type.

Back to top Generated by DocFX