►
From YouTube: .NET Design Review: AssemblyLoadContext improvements
Description
-17:-02:-08 - Approved: API proposal AssemblyLoadContext.ActiveForContextSensitiveReflection https://github.com/dotnet/corefx/issues/36236#issuecomment-476796579
00:42:56 - Approved: AssemblyLoadContext .NET Core 3.0 improvements https://github.com/dotnet/corefx/issues/34791#issuecomment-476796715
B
B
Simple
additions
to
the
assembly
load
context
to
sort
of
make
it
more
function
and
complete
we're.
At
a
we
tried,
there
was
a
desire
to
simplify
usage
in
the
creation
of
plug-in
context
to
make
this
a
concrete
type
instead
of
a
abstract
type,
so
we're
proposing
adding
a
default
load
implementation
which
simply
returns
null.
B
This
is
actually
the
implementation
that's
used
in
to
our
internal
Hales
assembly
load
context
as
well.
When
you
return
all
that
method
implies,
try
to
load
it
from
the
default
first,
and
so
that's
sort
of
a
logical
default
implementation.
It
says
if
you,
if
I'm
missing
a
dependency,
go,
try
to
load
it
from
my
default
context
and
then
come
back
and
call
my
resolving
event
for
me
to
get
a
second
chance
if
I
to
find
it
assembly.
B
So
if
you
it
for
assembly
load
context,
usage
which
which
would
prefer
late
binding
of
assemblies
as
opposed
to
early
like
it,
wants
a
second
chance
for
somebody's
that
are
not
found
in
the
default.
This
is
sort
of
a
logical
default,
so
we've
used
it
in
a
couple
of
our
internal
invitations
and
it
it
feels
natural
for
plugins.
At
a
couple
places,
the
second
sort
of
feature
is
adding
a
name
just
so
that
the
assembly
load
context.
When
you
query
them
in
a
debugger
or
you
want
to
print
them,
they
have
some
sort
of
identity.
B
That's
human,
readable
part
of
that
name
proposal
is
some
assembly
load
context,
get
created
automatically
in
the
assembly
load
methods
Loadstar
at
methods,
some
of
those
actually
create
or
something
about
context
automatically.
So
the
proposal
includes
is
what
that
those
will
assign
a
name
to
the
the
automatically
created
assembly
hood
context
as
well,
and
it
override
the
to
string
method
for
similar
reasons
and
then
we're
adding
a
set
of
an
enumerable
to
return
the
the
context.
B
B
B
A
Point
because
I
mean
everybody
who
does
that?
Like
that's
probably
the
first
thing
you
try
to
get
right,
it's
like
getting
understanding
what's
loaded
and
what's
already,
and
they
should.
You
know,
load
your
stuff
into
just
doing
this
Linda
burger
and
just
seeing
what's
what's
there
it's
a
thing
super
useful
yeah.
A
B
Well,
and
if
you,
if
you
anything,
we
redid
it
again,
it
would
get
three
snapshot
ring
I.
Think
that's!
The
way
in
numerable
works
right
when
you,
basically
that
you
start
the
enumeration
iterate
through
it,
then
you
reset
it,
and
so,
when
you
start
an
enumeration,
it
would
snapshot
it.
And
when
you
didn't
read
it
again,
it
would
rese
not
John.
So.
B
A
I
think
that
sounds
to
me,
like
my
biggest
concern,
is
that
you
have
you
know
threading
issues
where
somebody
you
know
you
know
as
you.
It
is
it
all
that
you
just
try
to
create
a
graph
and
I'd
say
you
like
in
the
loop
you're,
instantiating
I,
don't
know
the
XML
reader,
which
happens
to
go
through
this
path
and
as
a
side
effect,
creates
another
context
and
suddenly
or
for
each
loop,
goes
in,
but
an
operation
exception,
because
the
collection
change
where
you
numerated
it
right.
A
Also,
the
kind
of
things
like
that,
you
know
I
think
snapshotting
seems
reasonable
to
me,
because
I
mean
that's
the
best
you
can
do.
My
concern
of
snapshotting
or
originally
was
is
like
the
naive
way
of
doing
it
would
just
say
every
time
you
create
the
property,
you
basically,
you
know,
do
a
two
array
or
something
and
then
property
a
basic
accessory
locates
every
single
time,
and
that
would
be
pretty
bad,
in
which
case
you
want
to
make
the
method.
If
you
do
it.
Basically,
on
the
first
time
the
Corbitt
enumerator,
it's
fine,
I
think.
B
What
named
is
my
assembly
load
context
kit,
so
that
so
we
did
add
a
constructor
to
allow
you
to
name
them.
If
you
have,
if
the
the
existing
code
wouldn't
obviously
use
that
constructor
so
right
now,
the
name
would
be
null,
but
the
two
string
would
include
the
type
name.
So
your
my
assembly
load
context
would
show
up
in
the
two
string
at
least
are.
D
D
C
I
mean
there's
no
secure
right
now.
Some
of
those
contacts
are
not
providing
any
securities
yeah
actually
didn't
mean
from
a
security.
Boundary
meant
more
from
an
expectation
like
if
it
is
anyone
like
if
someone
was
creating
their
own
assembly
load
context
than
one
area.
The
process
is
what
I
was
doing,
the
other.
Would
it
mess
up
anyone's
assumptions
about
how
their
some
of
the
context
works
for
arbitrary
assemblies
to
sort
of
be
shoved
into
it?.
B
Fine
I
am
I,
mean
they're.
Still
they
already
exist
backdoors
to
do
this
so
right
now
on
app
domain
you
can
call
get
assemblies
and
for
each
assembly
you
can
call
get
assembly
vote
contacts
to
find
the
Assembly
of
context.
So
these
are
sort
of
to
some
extent
convenient
safety.
Is
that
we've
kind
of
vetted
for
making
them
performant
and
make
it
easy
to
use
in
a
debugger?
So
I
don't
think
it's
not
really
exposing
new
functionality,
except
for
the
name.
F
F
B
B
F
A
A
The
thing
I
asked
this
question
on
the
thing
that
I
don't
exist.
We
call
the
answer
entirely.
So
the
idea
is
that,
if
you
can
you
up
in
assembly
local
context
now
right
and
then
I
can
say,
load
will
fin
assembly
name
over
the
past
right
like
the
path.
One
completely
makes
sense
to
me
because
you
call
they
detect.
A
You
know
you
just
point
to
an
assembly,
but
then,
as
as
this
assembly
is
basically
being
used,
other
loads
are
being
triggered
by
a
name
right
and
then
this
guy
will
just
return
now
and
I
think
you
said
that
the
basically,
if
you
returned
off
from
this
method,
it
just
means
that
some
default
policy
is
being
applied.
Is
that
correct
right.
B
I
mean
there's
still,
there's
still
sometimes
a
motivation
if
you
want
an
assembly
to
be
able
to
be
loaded
both
in
a
custom
assembly
context
and
the
default,
and
you
want
to
make
sure
it's
loaded
in
your
some
of
the
context
before
the
default.
Well,
then,
you'd
have
to
over
light
this
method,
but
that's
a
fairly
against
use
case.
What.
B
Right
now,
the
normal
ways
return
null
I
think
you
can
also.
You
can
also
say,
assembly,
low-context
default
load
with
I,
don't
know
exact
same,
but
there
is
a
load.
There's
a
method
on
the
some
of
the
context
to
do
that
right,
so
it
maybe
it's
look.
You
can
certainly
see
load
from
path,
I
think
think.
There's
a
load
by
assembly
name
to
which
effectively
triggers
this
scenario.
B
A
B
G
B
C
B
C
B
A
Yeah
I
think
that's
reasonable
right,
because,
basically
you
you
don't
expose
to
race
conditions
to
the
customers.
Right
I
mean
the
race
condition.
I
mean
there
is
a
race
condition,
but
you
don't
quite
know
when
it
happens,
but
it's
also
not
relevant
y-you.
Just
you
basically
I
think
the
API
shape
is
nice
because
it
doesn't
expose
a
big
reference
concept
right.
It
just
means
that
whenever
you
pull
on
the
assemblies,
we
give
you
what's
still
alive
and
that
might
be
less.
C
A
B
A
C
A
B
B
Basic
the
weave
there's
as
we
try
to
implement
plugins
xunit
and
WPF
we've
seen
problems
with
the
current
set
of
the
current
api's
were
originally
designed
to
take
advantage
of
the
ambient.
After
being
current
domain
and
as
we've
moved
from
app
domains
into
assembly
load
context,
we
don't
have
that
ambient
property
anymore
and
so
code
that
was
intended
to
run
within
an
app
domain,
suddenly
becomes
ambiguous
and
so
we're
trying
to
infer
the
assembly
load
context
from
an
assembly
and
they're.
Not
it's
not
a
one-to-one
mapping.
B
It's
unfortunate,
it's
very
difficult
to
understand
to
the
right
of
these
long,
hopefully
readable
so
I'm,
proposing
adding
a
read-only
property
which
is
active
for
consequence
of
reflection
and
I'm,
proposing
two
methods
that
return
I,
dispose
of
all
activate
for
context.
Sense
of
reflection
to
basically
set
this
property
in
a
using
block
and
to
clear
when
you
leave
the
using
block
so.
B
I
was
designing
it,
the
intent.
The
idea
that
I
had
was
that
the
person
that
was
create
loading,
the
plugin,
the
plugin
loader,
would
set
the
property
as
it
entered
the
plugin,
basically
saying
I'm
executing
I'm.
Turning
over
this
thread
of
execution
to
this
plug-in
I
expect
the
api's
behave
as
the
plugins.
B
A
B
A
B
Right
now,
the
current
behavior
is
right.
Now
the
current
behavior
these
api's
is
they
look
at
their
callers
assembly
and
figure
out
what
this
n
with
no
context
it's
loaded
into,
and
so
that's
the
cantos
emily
load
context
that's
being
used
right
now.
The
problem
is
only
when
you
have
a
stack
of
assemblies
and
one
of
them
is
in
like
a
framework,
that's
sort
of
required
to
be
loaded
in
default,
but
really
wants
to
be
loaded
in
the
plug-in
context.
B
D
B
B
D
D
B
D
I
Yeah,
there's
also
another
option
to
not
create
the
helper
for
disposing
at
all
and
make
it
just
a
property
that
you
just
set
and
clear,
and
you
kind
of
are
in
control.
You
know
what
what
what
you
want
to
do
it
in
tight.
Oh,
you
have
the
caller
used
to
try
finally
block
on
the
road
yeah,
for
example
I,
except
even
today.
I
the
number
of
kind
of
good
chance
with
these
that
you
can
kind
of
not
tell
to
stack
properly
and
forget
to
dispose
it
or
you
know
so.
D
I
You
can
imagine
if
somebody
here
they
wanted
to
mimic
what
happens
with
top
domains
right
up
domains
been
busy.
You
go
from
one
up
domain
to
other
after
mine.
You
always
go
through
a
proxy
that
base,
which
is
the
current
up
domain,
and
you
know
like
Marsh's
the
argument
and
whatnot
right.
So
if
somebody
wanted
to
mimic
this
kind
of
behavior,
they
would
busy
want
to
auto-generate
the
proxies
for
all
the
communication,
and
they
would
always
want
it
to
set
and
clear
this
property
in
that
proxy.
A
I
D
I
A
B
A
Well,
then,
you
put
a
different
light
like
depending
on
again.
If
you
want
to
evolve
the
behavior
here
like
today,
you
say:
oh,
we
don't
do
anything
local
tomorrow,
you
do
it
in
a
single
I.
Don't
know,
like
you,
remember
the
video
you
get
some
other
photos.
If
you
want
to
apply,
if
you
make
it
a
method,
returns
and
basically
and
I
disposable,
and
you
expose
what
what
the
only
way
we'd
only
you
get
to
deplete.
A
I
The
property
like
I,
don't
think
this
trucks
give
you
any
extra.
The
kind
of
safety
like
in
part
of
you
for
the
async
case,
I,
don't
think
the
property
prepares
of
struck
makes
any
difference
we
have.
For
example.
Today
we
have
culture
in
photocurrent,
culture
that
also
flows
with
a
sink
and
people
just
set
and
create,
or
you
know,
do
what
I'm
going
to
take
one
a
minute.
I.
D
A
Yeah
like
to
insert
about
safety,
it's
more
about,
if
you
ever
want
to
change
the
ceremony
of
going
from
one
context
to
the
other
like,
if
you
sure
it's
only
going
to
be
a
single
property
and
you
just
restore
the
old
value,
I
think
it's
pretty
much
the
same
about
modern
lines
of
code.
Everybody
has
to
write.
It
just
means
you
better.
Never
change
that.
D
But
if
all
that's
flowing
with
the
async
context
is
the
oneness
and
we
load
contacts,
then
the
struck
disposable.
When
you
push
in
it,
assigns
it
when
you
pop
out
it
the
lasing
state
snapped
it.
So
you
don't
care,
but
then
the
serie.
The
synchronous
flow
now
has
the
restored
correct
value,
so
it
seems
to
still
magic
the
disposable
pattern.
A
C
B
C
It
would
flow
into
it
so
for
that
in
general,
unless
you're
doing
something
complicated
by
default
like
if
you
did
task
dot
run
or
you
did
thread,
people
accuse
a
work
item
or
something
and
the
async
local
is
only
going
to
exist
for
the
batch
scoped
delegate
or
whatever
that
you
passed
and
then
the
underlying
infrastructure
is
going
to
clear
it
out.
But
if
you
did
execution
context,
capture
you're,
basically
holding
on
to
that
indefinitely
until
you
drop
that
context.
C
But
if
so,
if
we
cared
about
that
and
if
we
wanted
to
force
it
to
be
cleared
effectively
from
everywhere,
when
you
did
dispose,
then
the
thing
that
you
stored
in
the
async
local
you'd
want
it
to
be
like
a
strongbox
of
tea
rather
than
a
tea,
and
then
we
undisposed.
We
would
know
out
that
the
strongbox
value
I
don't
know
if
that's
what
we
want,
but
that's
how
you
could
probably
do
it
again
right
now,.
D
Should
the
current,
but
the
current
value
be
exposed
as
a
static
property
anywhere,
or
is
that
not
useful?
It.
C
B
D
D
Current
context-sensitive
context
and
then
the
instead
of
activate
just
called
you
know,
make
contact
sensitive
or
something
out
of
them
there
again
there.
These
are
off
in
the
week,
so
it
doesn't
matter
so
much,
but
I
feel
that
most
of
the
places
that
we
have
the
static
things
like
this,
the
the
static
is
called
current.
Okay.