7 instantiations of SecurityContext
mscorlib (7)
system\security\principal\windowsidentity.cs (1)
786
sc = new
SecurityContext
();
system\security\securitycontext.cs (5)
299
ec.SecurityContext = new
SecurityContext
();
512
SecurityContext sc = new
SecurityContext
();
533
SecurityContext sc = new
SecurityContext
();
582
SecurityContext sc = new
SecurityContext
();
606
SecurityContext sc = new
SecurityContext
();
system\threading\compressedstack.cs (1)
410
SecurityContext sc = new
SecurityContext
();
75 references to SecurityContext
mscorlib (56)
system\security\principal\windowsidentity.cs (2)
771
return
SecurityContext
.GetCurrentWI(Thread.CurrentThread.GetExecutionContextReader());
782
SecurityContext
sc = ec.SecurityContext;
system\security\securitycontext.cs (33)
62
internal
SecurityContext
.Reader prevSC; // prev SC that we restore on an Undo
63
internal
SecurityContext
currSC; //current SC - SetSecurityContext that created the switcher set this on the Thread
177
static private volatile
SecurityContext
_fullTrustSC;
189
SecurityContext
m_sc;
191
public Reader(
SecurityContext
sc) { m_sc = sc; }
193
public
SecurityContext
DangerousGetRawSecurityContext() { return m_sc; }
196
public bool IsSame(
SecurityContext
sc) { return m_sc == sc; }
197
public bool IsSame(
SecurityContext
.Reader sc) { return m_sc == sc.m_sc; }
215
static internal
SecurityContext
FullTrustSecurityContext
308
SecurityContext
sc = Thread.CurrentThread.GetMutableExecutionContext().SecurityContext;
318
return
SecurityContext
.IsFlowSuppressed(SecurityContextDisableFlow.All);
323
return (_LegacyImpersonationPolicy||
SecurityContext
.IsFlowSuppressed(SecurityContextDisableFlow.WI));
339
public static void Run(
SecurityContext
securityContext, ContextCallback callback, Object state)
360
if (
SecurityContext
.CurrentlyInDefaultFTSecurityContext(ec)
383
internal static void RunInternal(
SecurityContext
securityContext, ContextCallback callBack, Object state)
397
internal
SecurityContext
sc;
401
internal SecurityContextRunData(
SecurityContext
securityContext, ContextCallback cb, Object state)
441
internal static SecurityContextSwitcher SetSecurityContext(
SecurityContext
sc,
SecurityContext
.Reader prevSecurityContext, bool modifyCurrentExecutionContext)
452
internal static SecurityContextSwitcher SetSecurityContext(
SecurityContext
sc,
SecurityContext
.Reader prevSecurityContext, bool modifyCurrentExecutionContext, ref StackCrawlMark stackMark)
505
public
SecurityContext
CreateCopy()
512
SecurityContext
sc = new SecurityContext();
529
internal
SecurityContext
CreateMutableCopy()
533
SecurityContext
sc = new SecurityContext();
550
public static
SecurityContext
Capture( )
557
SecurityContext
sc =
SecurityContext
.Capture(Thread.CurrentThread.GetExecutionContextReader(), ref stackMark);
566
static internal
SecurityContext
Capture(ExecutionContext.Reader currThreadEC, ref StackCrawlMark stackMark)
580
static private
SecurityContext
CaptureCore(ExecutionContext.Reader currThreadEC, ref StackCrawlMark stackMark)
582
SecurityContext
sc = new SecurityContext();
604
static internal
SecurityContext
CreateFullTrustSecurityContext()
606
SecurityContext
sc = new SecurityContext();
system\threading\compressedstack.cs (1)
410
SecurityContext
sc = new SecurityContext();
system\threading\executioncontext.cs (20)
372
SecurityContext
.RestoreCurrentWI(outerEC, innerEC, wi, cachedAlwaysFlowImpersonationPolicy);
393
private
SecurityContext
_sc;
448
SecurityContext
.RestoreFlow();
504
private
SecurityContext
_securityContext;
618
public
SecurityContext
.Reader SecurityContext
622
get { return new
SecurityContext
.Reader(IsNull ? null : m_ec.SecurityContext); }
872
internal
SecurityContext
SecurityContext
957
SecurityContext
.CurrentlyInDefaultFTSecurityContext(ec) &&
1003
ecsw.cachedAlwaysFlowImpersonationPolicy =
SecurityContext
.AlwaysFlowImpersonationPolicy;
1005
Contract.Assert(
SecurityContext
.GetCurrentWI(ecsw.outerEC, ecsw.cachedAlwaysFlowImpersonationPolicy) == null);
1007
ecsw.wi =
SecurityContext
.GetCurrentWI(ecsw.outerEC, ecsw.cachedAlwaysFlowImpersonationPolicy);
1055
SecurityContext
sc = executionContext.SecurityContext;
1059
SecurityContext
.Reader prevSeC = outerEC.SecurityContext;
1060
ecsw.scsw =
SecurityContext
.SetSecurityContext(sc, prevSeC, false, ref stackMark);
1062
else if (!
SecurityContext
.CurrentlyInDefaultFTSecurityContext(ecsw.outerEC))
1065
SecurityContext
.Reader prevSeC = outerEC.SecurityContext;
1066
ecsw.scsw =
SecurityContext
.SetSecurityContext(
SecurityContext
.FullTrustSecurityContext, prevSeC, false, ref stackMark);
1248
SecurityContext
secCtxNew =
SecurityContext
.Capture(ecCurrent, ref stackMark);
SMSvcHost (4)
System\ServiceModel\Activation\TransportListener.cs (4)
141
if (
SecurityContext
.IsFlowSuppressed())
147
using (
SecurityContext
.SuppressFlow())
157
if (
SecurityContext
.IsFlowSuppressed())
163
using (
SecurityContext
.SuppressFlow())
System (1)
net\System\Net\_ContextAwareResult.cs (1)
374
(!capturingContext ||
SecurityContext
.IsWindowsIdentityFlowSuppressed()))
System.ServiceModel (1)
System\ServiceModel\Channels\FramingChannels.cs (1)
450
if (flowIdentity && !
SecurityContext
.IsWindowsIdentityFlowSuppressed())
System.ServiceModel.Activation (2)
System\ServiceModel\Activation\AspNetPartialTrustHelpers.cs (2)
19
static
SecurityContext
aspNetSecurityContext;
86
SecurityContext
.Run(aspNetSecurityContext.CreateCopy(), callback, state);
System.ServiceModel.Internals (11)
System\Runtime\ActionItem.cs (6)
16
SecurityContext
context;
96
protected void ScheduleWithContext(
SecurityContext
context)
143
SecurityContext
ExtractContext()
147
SecurityContext
result = this.context;
211
SecurityContext
context = ((ActionItem)state).ExtractContext();
212
SecurityContext
.Run(context, OnContextAppliedCallback, state);
System\Runtime\PartialTrustHelpers.cs (5)
58
internal static
SecurityContext
CaptureSecurityContextNoIdentityFlow()
61
if (
SecurityContext
.IsWindowsIdentityFlowSuppressed())
63
return
SecurityContext
.Capture();
67
using (
SecurityContext
.SuppressFlowWindowsIdentity())
69
return
SecurityContext
.Capture();