Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / ComIntegration / ComPlusServiceHost.cs / 1 / ComPlusServiceHost.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- #pragma warning disable 1634, 1691 namespace System.ServiceModel.ComIntegration { using System; using System.ServiceModel.Dispatcher; using System.ServiceModel.Description; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Runtime.InteropServices; using System.ServiceModel; using System.ServiceModel.Configuration; using System.Diagnostics; using System.ServiceModel.Diagnostics; abstract class ComPlusServiceHost : ServiceHostBase { ServiceInfo info; protected void Initialize (Guid clsid, ServiceElement service, ComCatalogObject applicationObject, ComCatalogObject classObject, HostingMode hostingMode) { VerifyFunctionality(); this.info = new ServiceInfo(clsid, service, applicationObject, classObject, hostingMode); base.InitializeDescription(new UriSchemeKeyedCollection()); } protected override void ApplyConfiguration() { } protected override ServiceDescription CreateDescription(out IDictionaryimplementedContracts) { try { ComPlusServiceLoader loader = new ComPlusServiceLoader(this.info); ServiceDescription description = loader.Load(this); implementedContracts = null; return description; } catch (Exception e) { DiagnosticUtility.EventLog.LogEvent(TraceEventType.Error, EventLogCategory.ComPlus, EventLogEventId.ComPlusServiceHostStartingServiceError, this.info.AppID.ToString(), this.info.Clsid.ToString(), e.ToString()); throw; } } protected override void InitializeRuntime() { ComPlusServiceHostTrace.Trace(TraceEventType.Information, TraceCode.ComIntegrationServiceHostStartingService, SR.TraceCodeComIntegrationServiceHostStartingService, this.info); try { DispatcherBuilder dispatcherBuilder = new DispatcherBuilder(); dispatcherBuilder.InitializeServiceHost(this.Description, this); } catch (Exception e) { if (System.ServiceModel.DiagnosticUtility.ShouldTraceError) { DiagnosticUtility.EventLog.LogEvent(TraceEventType.Error, EventLogCategory.ComPlus, EventLogEventId.ComPlusServiceHostStartingServiceError, this.info.AppID.ToString(), this.info.Clsid.ToString(), e.ToString()); } throw; } ComPlusServiceHostTrace.Trace(TraceEventType.Verbose, TraceCode.ComIntegrationServiceHostStartedServiceDetails, SR.TraceCodeComIntegrationServiceHostStartedServiceDetails, this.info, this.Description); ComPlusServiceHostTrace.Trace(TraceEventType.Information, TraceCode.ComIntegrationServiceHostStartedService, SR.TraceCodeComIntegrationServiceHostStartedService, this.info); } protected override void OnClose(TimeSpan timeout) { ComPlusServiceHostTrace.Trace(TraceEventType.Information, TraceCode.ComIntegrationServiceHostStoppingService, SR.TraceCodeComIntegrationServiceHostStoppingService, this.info); base.OnClose(timeout); ComPlusServiceHostTrace.Trace(TraceEventType.Information, TraceCode.ComIntegrationServiceHostStoppedService, SR.TraceCodeComIntegrationServiceHostStoppedService, this.info); } protected void VerifyFunctionality() { object serviceConfig = new CServiceConfig(); IServiceSysTxnConfig sysTxnconfing = serviceConfig as IServiceSysTxnConfig; if (sysTxnconfing == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(System.ServiceModel.ComIntegration.Error.QFENotPresent()); } } } } // 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
- DataBoundControlDesigner.cs
- ImageAutomationPeer.cs
- HasCopySemanticsAttribute.cs
- SchemaNamespaceManager.cs
- BaseDataBoundControl.cs
- EmptyCollection.cs
- SiteMembershipCondition.cs
- ParserExtension.cs
- ListViewUpdatedEventArgs.cs
- Style.cs
- ConfigurationElement.cs
- ControlType.cs
- StyleSheetDesigner.cs
- LogStore.cs
- COM2ComponentEditor.cs
- InputGestureCollection.cs
- WebCategoryAttribute.cs
- GACIdentityPermission.cs
- Vector3DValueSerializer.cs
- DrawingContextDrawingContextWalker.cs
- OleDbCommandBuilder.cs
- BindingRestrictions.cs
- MouseWheelEventArgs.cs
- XPathItem.cs
- BufferedGenericXmlSecurityToken.cs
- RectConverter.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- DeferredReference.cs
- OutputCacheSettingsSection.cs
- SQLInt64.cs
- SelectionUIHandler.cs
- ThrowHelper.cs
- CodeGen.cs
- ExpressionParser.cs
- ApplicationCommands.cs
- BuildDependencySet.cs
- CheckBox.cs
- MarkupCompilePass2.cs
- BindingSource.cs
- PaginationProgressEventArgs.cs
- RelatedEnd.cs
- MetafileHeaderWmf.cs
- GorillaCodec.cs
- XPathNodeHelper.cs
- OracleBinary.cs
- PriorityBinding.cs
- PerformanceCounterScope.cs
- ArgumentOutOfRangeException.cs
- XmlWrappingReader.cs
- TabItem.cs
- RotateTransform.cs
- GeneralTransform3D.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- ResourcesGenerator.cs
- BindingValueChangedEventArgs.cs
- ErasingStroke.cs
- WrappedIUnknown.cs
- NotificationContext.cs
- ArraySubsetEnumerator.cs
- ReadOnlyCollectionBase.cs
- RayHitTestParameters.cs
- TransformerInfo.cs
- AffineTransform3D.cs
- Binding.cs
- DefaultBindingPropertyAttribute.cs
- TiffBitmapEncoder.cs
- NodeCounter.cs
- IndentedTextWriter.cs
- WebPartAddingEventArgs.cs
- XmlSchemaAppInfo.cs
- mediaeventshelper.cs
- Cursor.cs
- NativeMethods.cs
- QilIterator.cs
- RegexRunner.cs
- CompressedStack.cs
- QilNode.cs
- IndependentlyAnimatedPropertyMetadata.cs
- XmlSchemaDocumentation.cs
- XhtmlMobileTextWriter.cs
- itemelement.cs
- DataSpaceManager.cs
- _ConnectOverlappedAsyncResult.cs
- TypeNameParser.cs
- CultureInfo.cs
- GACMembershipCondition.cs
- PieceNameHelper.cs
- ApplicationManager.cs
- ProfileSettingsCollection.cs
- ScriptModule.cs
- SafeFileMappingHandle.cs
- RecordConverter.cs
- BooleanConverter.cs
- PassportPrincipal.cs
- ErasingStroke.cs
- ScaleTransform3D.cs
- SchemaImporterExtensionsSection.cs
- XmlAttribute.cs
- PageTheme.cs
- BitmapImage.cs