Show / Hide Table of Contents

Interface IPolicySet

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

Methods

| Improve this Doc View Source

Clear(Type)

Remove specific policy from the list

Declaration
void Clear(Type policyInterface)
Parameters
Type Name Description
Type policyInterface

Type of policy to be removed

| Improve this Doc View Source

Get(Type)

Get policy

Declaration
object Get(Type policyInterface)
Parameters
Type Name Description
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, Object)

Set policy

Declaration
void Set(Type policyInterface, object policy)
Parameters
Type Name Description
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)
PolicySetExtensions.Get<T>(IPolicySet)
PolicySetExtensions.Set<T>(IPolicySet, Object)
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2020 .NET Foundation and Contributors. All Rights Reserved