在Unity容器中注销实例 [英] Unregister Instance in Unity container

查看:61
本文介绍了在Unity容器中注销实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何在统一容器中取消注册实例.

How can i unregister instance in unity container.

我确定有可能,但是在手动文档中找不到解决方法

I sure that it possible, but can't find solution in manual docs

推荐答案

没有注销.您可以在现有实例的顶部注册一个新实例,然后将其替换为新注册的实例.

There is no unregister. You can register a new instance on top of an existing one, and it'll replace the previous one with the newly registered instance.

这篇关于在Unity容器中注销实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆