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