Skip to content

Commit

Permalink
Update wrappers-resolvers.md
Browse files Browse the repository at this point in the history
  • Loading branch information
z4kn4fein committed Sep 6, 2023
1 parent c415008 commit 3bcbd15
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions docs/docs/advanced/wrappers-resolvers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 3bcbd15

Please sign in to comment.