Show / Hide Table of Contents

Interface IPolicyList

A custom collection over Object objects.

Namespace: Unity.Policy
Assembly: Unity.Abstractions.dll
Syntax
public interface IPolicyList

Methods

| Improve this Doc View Source

Clear(Type, String, Type)

Remove specific policy from the list

Declaration
void Clear(Type type, string name, Type policyInterface)
Parameters
Type Name Description
Type type

Type of the registration

String name

Name of the registration

Type policyInterface

Type of policy to be removed

| Improve this Doc View Source

Get(Type, String, Type)

Get policy

Declaration
object Get(Type type, string name, Type policyInterface)
Parameters
Type Name Description
Type type

Type of the registration

String name

Name of the registration

Type policyInterface

Type of policy to retrieve

Returns
Type Description
Object

Instance of the policy or null if none found

| Improve this Doc View Source

Get(Type, Type)

Get default policy for the type

Declaration
object Get(Type type, Type policyInterface)
Parameters
Type Name Description
Type type

Type of the registration

Type policyInterface

Type of policy to retrieve

Returns
Type Description
Object

Instance of the policy or null if none found

| Improve this Doc View Source

Set(Type, String, Type, Object)

Set policy

Declaration
void Set(Type type, string name, Type policyInterface, object policy)
Parameters
Type Name Description
Type type

Type of the registration

String name

Name of the registration

Type policyInterface

Type of policy to be set

Object policy

Policy instance to be set

| Improve this Doc View Source

Set(Type, Type, Object)

Set default policy for the type

Declaration
void Set(Type type, Type policyInterface, object policy)
Parameters
Type Name Description
Type type

Type of the registration

Type policyInterface

Type of policy to be set

Object policy

Policy instance to be set

Extension Methods

InjectionMatching.Matches(Object, Type)
InjectionMatching.MatchesObject(Object, Type)
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2020 .NET Foundation and Contributors. All Rights Reserved