What's the deal with
It says it defines [w]ell-known sharing boundary names. The composition provider uses all of these when handling a web request and then goes on to define three:
Which is to say, they might as well be called
But basically it looks like everything but
Microsoft.Composition.Demos.Web.Mvc.Boundaries
?It says it defines [w]ell-known sharing boundary names. The composition provider uses all of these when handling a web request and then goes on to define three:
// The boundary within which a
// current HTTP request is accessible.
public const string HttpRequest = "HttpRequest";
// The boundary within which a
// consistent view of persistent data is available.
public const string DataConsistency = "DataConsistency";
// The boundary within which a
// single user can be identified.
public const string UserIdentity = "UserIdentity";
As far as I can tell, these aren't "well-known" to anything, and at the end of the day they're all per-request care of CompositionProvider.CurrentInitialisedScope
leaning on HttpContext.Current
.Which is to say, they might as well be called
PerRequestBoundary1
, PerRequestBoundary2
, and PerRequestBoundary3
.Boundaries.cs
hints at as much with: The composition provider uses all of these when handling a web request.But basically it looks like everything but
HttpRequest
are misnomers: there's nothing about the string "UserIdentity"
that actually links a part's lifetime to the request's user identity.