Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / Hosting / ContextBase.cs / 1 / ContextBase.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.Hosting {
using System.Web;
using System.Web.Configuration;
using System.Runtime.Remoting.Messaging;
using System.Security.Permissions;
internal class ContextBase {
internal static Object Current {
get {
return CallContext.HostContext;
}
[SecurityPermission(SecurityAction.Demand, Unrestricted = true)]
set {
CallContext.HostContext = value;
}
}
// static methods
internal static Object SwitchContext(Object newContext) {
Object oldContext = CallContext.HostContext;
if (oldContext != newContext)
CallContext.HostContext = newContext;
return oldContext;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.Hosting {
using System.Web;
using System.Web.Configuration;
using System.Runtime.Remoting.Messaging;
using System.Security.Permissions;
internal class ContextBase {
internal static Object Current {
get {
return CallContext.HostContext;
}
[SecurityPermission(SecurityAction.Demand, Unrestricted = true)]
set {
CallContext.HostContext = value;
}
}
// static methods
internal static Object SwitchContext(Object newContext) {
Object oldContext = CallContext.HostContext;
if (oldContext != newContext)
CallContext.HostContext = newContext;
return oldContext;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WebPartTransformerCollection.cs
- ByteKeyFrameCollection.cs
- SecurityContext.cs
- DbExpressionVisitor_TResultType.cs
- Control.cs
- ToolStripMenuItem.cs
- SizeF.cs
- Win32.cs
- QilChoice.cs
- RegexGroup.cs
- DBProviderConfigurationHandler.cs
- DbFunctionCommandTree.cs
- HandoffBehavior.cs
- CodeGenerator.cs
- StrokeFIndices.cs
- DrawingAttributeSerializer.cs
- WebBrowserEvent.cs
- OptimalTextSource.cs
- ColumnResizeAdorner.cs
- IInstanceTable.cs
- Mapping.cs
- SystemKeyConverter.cs
- WebBrowserSiteBase.cs
- ThemeDirectoryCompiler.cs
- CookieHandler.cs
- ToolboxComponentsCreatedEventArgs.cs
- TextEncodedRawTextWriter.cs
- FormatControl.cs
- IgnoreFileBuildProvider.cs
- XslVisitor.cs
- SerialReceived.cs
- TypeToken.cs
- SqlDataSourceQuery.cs
- SafeReversePInvokeHandle.cs
- FocusManager.cs
- AssociationTypeEmitter.cs
- embossbitmapeffect.cs
- DocumentOrderComparer.cs
- UInt32.cs
- IssuerInformation.cs
- TransformCryptoHandle.cs
- PopupControlService.cs
- DataBoundLiteralControl.cs
- DependencyObject.cs
- WebBrowserUriTypeConverter.cs
- ObjectDisposedException.cs
- Rect.cs
- Currency.cs
- Input.cs
- FileDialogCustomPlaces.cs
- WindowsSysHeader.cs
- WSHttpBindingBaseElement.cs
- ColumnPropertiesGroup.cs
- EntityDataSourceConfigureObjectContext.cs
- StoreAnnotationsMap.cs
- ISAPIRuntime.cs
- CoTaskMemHandle.cs
- ListSourceHelper.cs
- CreateUserWizardStep.cs
- DataSourceDescriptorCollection.cs
- WebPartDisplayModeEventArgs.cs
- XmlLangPropertyAttribute.cs
- DoubleStorage.cs
- CodeIterationStatement.cs
- GenericUI.cs
- CellCreator.cs
- ContentPresenter.cs
- GlyphRun.cs
- ComponentDesigner.cs
- LateBoundChannelParameterCollection.cs
- EnumValAlphaComparer.cs
- ClientEventManager.cs
- TextCharacters.cs
- MarkerProperties.cs
- ADRoleFactoryConfiguration.cs
- ColumnResult.cs
- VirtualPath.cs
- XsltContext.cs
- PageParser.cs
- Positioning.cs
- PageCatalogPart.cs
- SchemaImporterExtension.cs
- DesignerAttributeInfo.cs
- ToolStripGripRenderEventArgs.cs
- BitmapMetadataEnumerator.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- coordinatorfactory.cs
- SchemaNamespaceManager.cs
- SiteMapNodeItemEventArgs.cs
- ConsumerConnectionPoint.cs
- Knowncolors.cs
- MessageDroppedTraceRecord.cs
- ContractsBCL.cs
- DeviceContext2.cs
- UIAgentInitializationException.cs
- BlurBitmapEffect.cs
- DetailsViewActionList.cs
- WriteTimeStream.cs
- WorkflowMarkupSerializerMapping.cs
- Base64Encoder.cs