From 3bcbd15d480990ecab1aa1f4737e3c1490f05700 Mon Sep 17 00:00:00 2001 From: Peter Csajtai Date: Wed, 6 Sep 2023 13:42:38 +0200 Subject: [PATCH] Update wrappers-resolvers.md --- docs/docs/advanced/wrappers-resolvers.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/docs/docs/advanced/wrappers-resolvers.md b/docs/docs/advanced/wrappers-resolvers.md index d9a0f8ee..3f9393dd 100644 --- a/docs/docs/advanced/wrappers-resolvers.md +++ b/docs/docs/advanced/wrappers-resolvers.md @@ -225,21 +225,17 @@ class CustomWrapper : IServiceWrapper // this method is called by the container to determine whether a // given requested type is wrapped by a supported wrapper type. - public bool TryUnWrap( - TypeInformation typeInformation, - out TypeInformation unWrappedType) + public bool TryUnWrap(Type type, out Type unWrappedType) { // this is just a reference implementation of // un-wrapping a service from a given wrapper. - if (!CanUnWrapServiceType(typeInformation.Type)) + if (!CanUnWrapServiceType(type)) { - unWrappedType = null; + unWrappedType = typeof(object); return false; } - var type = UnWrapServiceType(typeInformation.Type) - - unWrappedType = typeInformation.Clone(type); + unWrappedType = UnWrapServiceType(type); return true; } }