Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / Configuration / ProtocolsConfigurationEntry.cs / 2 / ProtocolsConfigurationEntry.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.Configuration {
using System.IO;
using System.Runtime.Serialization.Formatters;
using System.Threading;
using System.Runtime.InteropServices;
using System.ComponentModel;
using System.Collections;
using System.Configuration;
using System.Reflection;
using System.Globalization;
using System.Web.Hosting;
using System.Web.Security;
using System.Web.Util;
using System.Xml;
internal class ProtocolsConfigurationEntry {
private String _id;
private String _processHandlerTypeName;
private Type _processHandlerType;
private String _appDomainHandlerTypeName;
private Type _appDomainHandlerType;
private bool _typesValidated;
private String _configFileName;
private int _configFileLine;
internal ProtocolsConfigurationEntry(
String id,
String processHandlerType,
String appDomainHandlerType,
bool validate,
String configFileName,
int configFileLine) {
_id = id;
_processHandlerTypeName = processHandlerType;
_appDomainHandlerTypeName = appDomainHandlerType;
_configFileName = configFileName;
_configFileLine = configFileLine;
if (validate) {
ValidateTypes();
}
}
private void ValidateTypes() {
if (_typesValidated)
return;
// check process protocol handler
Type processHandlerType;
try {
processHandlerType = Type.GetType(_processHandlerTypeName, true /*throwOnError*/);
}
catch (Exception e) {
throw new ConfigurationErrorsException(e.Message, e, _configFileName, _configFileLine);
}
HandlerBase.CheckAssignableType(_configFileName, _configFileLine, typeof(ProcessProtocolHandler), processHandlerType);
// check app domain protocol handler
Type appDomainHandlerType;
try {
appDomainHandlerType = Type.GetType(_appDomainHandlerTypeName, true /*throwOnError*/);
}
catch (Exception e) {
throw new ConfigurationErrorsException(e.Message, e, _configFileName, _configFileLine);
}
HandlerBase.CheckAssignableType(_configFileName, _configFileLine, typeof(AppDomainProtocolHandler), appDomainHandlerType);
// remember types
_processHandlerType = processHandlerType;
_appDomainHandlerType = appDomainHandlerType;
_typesValidated = true;
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TableLayoutPanelCellPosition.cs
- ImageDrawing.cs
- InstanceValue.cs
- UrlPropertyAttribute.cs
- ToolStripDropDownButton.cs
- Span.cs
- ExpressionWriter.cs
- MapPathBasedVirtualPathProvider.cs
- ToolStripButton.cs
- AgileSafeNativeMemoryHandle.cs
- EventEntry.cs
- MediaSystem.cs
- BamlMapTable.cs
- DefaultProxySection.cs
- ScrollViewer.cs
- EdmComplexPropertyAttribute.cs
- HttpCookiesSection.cs
- ComPlusContractBehavior.cs
- SoapReflectionImporter.cs
- SpecialNameAttribute.cs
- DbParameterHelper.cs
- Span.cs
- IdentityValidationException.cs
- ImageList.cs
- RelationshipFixer.cs
- SqlClientMetaDataCollectionNames.cs
- CodeCastExpression.cs
- ErrorTableItemStyle.cs
- AppSecurityManager.cs
- EasingQuaternionKeyFrame.cs
- ColumnMapTranslator.cs
- RotateTransform.cs
- Parser.cs
- DataControlExtensions.cs
- IisTraceWebEventProvider.cs
- Int64KeyFrameCollection.cs
- ModulesEntry.cs
- Geometry3D.cs
- Mappings.cs
- OracleException.cs
- Enumerable.cs
- BufferedReceiveElement.cs
- EventListener.cs
- FederatedMessageSecurityOverHttp.cs
- TreeViewHitTestInfo.cs
- basemetadatamappingvisitor.cs
- ResponseStream.cs
- SafeFileHandle.cs
- OutputWindow.cs
- COM2Enum.cs
- DrawingDrawingContext.cs
- MimeObjectFactory.cs
- linebase.cs
- Logging.cs
- ScrollBarAutomationPeer.cs
- activationcontext.cs
- MouseActionConverter.cs
- DataGridViewColumnCollectionDialog.cs
- ProviderUtil.cs
- PerformanceCounterCategory.cs
- BindingCollection.cs
- ListViewItemEventArgs.cs
- ReadWriteSpinLock.cs
- BaseDataList.cs
- DropShadowEffect.cs
- ProfileGroupSettings.cs
- COM2EnumConverter.cs
- PointAnimation.cs
- InsufficientMemoryException.cs
- KeyedHashAlgorithm.cs
- Constants.cs
- HttpHeaderCollection.cs
- CharConverter.cs
- PeerTransportElement.cs
- BuildProvider.cs
- MemberCollection.cs
- UnsafeNativeMethodsMilCoreApi.cs
- XPathDocument.cs
- ConfigurationElementProperty.cs
- InkCollectionBehavior.cs
- MLangCodePageEncoding.cs
- FormatterServices.cs
- CopyAttributesAction.cs
- UnsafeNativeMethods.cs
- ExceptionHelpers.cs
- ColumnPropertiesGroup.cs
- PartitionedStream.cs
- ExpressionBinding.cs
- ServiceObjectContainer.cs
- Mappings.cs
- WebPartEditVerb.cs
- WindowsStatic.cs
- AuthenticationServiceManager.cs
- DataGridView.cs
- ConditionalDesigner.cs
- DataGridHyperlinkColumn.cs
- SqlConnectionString.cs
- AffineTransform3D.cs
- EmbeddedObject.cs
- DocumentViewerHelper.cs