Skip to content

Commit 4697be1

Browse files
committed
simplified InheritInfoFromDependencyOwner #632
1 parent 7988890 commit 4697be1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/DryIoc/Container.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -9569,8 +9569,7 @@ public static ServiceDetails OfValue(object value) =>
95699569
/// <summary>Sets the service key as a detials of the service resolution.</summary>
95709570
[MethodImpl((MethodImplOptions)256)]
95719571
public static ServiceDetails OfServiceKey(object serviceKey) =>
9572-
new ServiceDetails(null, IfUnresolved.Throw, serviceKey, null, null, null,
9573-
hasCustomValue: false);
9572+
new ServiceDetails(null, IfUnresolved.Throw, serviceKey, null, null, null, hasCustomValue: false);
95749573

95759574
/// <summary>Creates new details out of provided settings and not null `serviceKey`.</summary>
95769575
[MethodImpl((MethodImplOptions)256)]
@@ -9794,10 +9793,11 @@ public static object InheritInfoFromDependencyOwner(this Type serviceType,
97949793
if (serviceType == requiredServiceType)
97959794
requiredServiceType = null;
97969795

9797-
if (serviceKey == null & requiredServiceType == null & metadataKey == null & metadata == null & ifUnresolved == IfUnresolved.Throw)
9796+
if (requiredServiceType == null & serviceKey == null & metadataKey == null & metadata == null & ifUnresolved == IfUnresolved.Throw)
97989797
return serviceType;
97999798

9800-
return ServiceInfo.Of(serviceType, ServiceDetails.Of(requiredServiceType, serviceKey, ifUnresolved, null, metadataKey, metadata));
9799+
var details = new ServiceDetails(requiredServiceType, ifUnresolved, serviceKey, metadataKey, metadata, null, hasCustomValue: false);
9800+
return ServiceInfo.Of(serviceType, details);
98019801
}
98029802

98039803
/// <summary>Returns required service type if it is specified and assignable to service type,

0 commit comments

Comments
 (0)