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
- DataFormats.cs
- IndependentlyAnimatedPropertyMetadata.cs
- KnownColorTable.cs
- DropShadowEffect.cs
- HtmlImage.cs
- ListViewCancelEventArgs.cs
- X509Extension.cs
- XamlFigureLengthSerializer.cs
- SizeLimitedCache.cs
- WindowsFont.cs
- GestureRecognitionResult.cs
- ProgressBarAutomationPeer.cs
- ResizingMessageFilter.cs
- UncommonField.cs
- Soap.cs
- AssemblyAttributes.cs
- DbSetClause.cs
- TranslateTransform3D.cs
- UInt16.cs
- NameTable.cs
- MSAAWinEventWrap.cs
- SevenBitStream.cs
- ImageListUtils.cs
- GeneralTransform3DTo2D.cs
- StructuralComparisons.cs
- WindowsPen.cs
- Int32KeyFrameCollection.cs
- Range.cs
- FunctionQuery.cs
- x509utils.cs
- CodeLinePragma.cs
- AutoGeneratedFieldProperties.cs
- Range.cs
- OdbcException.cs
- TextCollapsingProperties.cs
- ChildTable.cs
- WeakReferenceEnumerator.cs
- StringDictionary.cs
- OutputCacheSettingsSection.cs
- PluralizationService.cs
- ReceiveMessageRecord.cs
- TextTreeFixupNode.cs
- ToolStripContentPanelRenderEventArgs.cs
- MessageAction.cs
- ShortcutKeysEditor.cs
- MatrixKeyFrameCollection.cs
- DependencyStoreSurrogate.cs
- XamlStyleSerializer.cs
- VoiceObjectToken.cs
- ProvidersHelper.cs
- DataSourceCacheDurationConverter.cs
- ParserHooks.cs
- TextViewBase.cs
- GeneralTransform.cs
- EntityDataReader.cs
- EndpointInfoCollection.cs
- TimeZone.cs
- IntSecurity.cs
- XmlSchemaSimpleContent.cs
- FileDetails.cs
- cookie.cs
- DecoratedNameAttribute.cs
- SmtpLoginAuthenticationModule.cs
- TrackBar.cs
- XmlDataDocument.cs
- XmlAttributes.cs
- ForeignKeyConstraint.cs
- GenericWebPart.cs
- PixelFormatConverter.cs
- TypeBuilderInstantiation.cs
- PersistenceTypeAttribute.cs
- RelatedImageListAttribute.cs
- FormViewCommandEventArgs.cs
- HtmlShimManager.cs
- ThreadInterruptedException.cs
- TaskHelper.cs
- SourceLineInfo.cs
- ScopedKnownTypes.cs
- FileBasedResourceGroveler.cs
- XmlLangPropertyAttribute.cs
- DataGridColumnHeader.cs
- CacheDependency.cs
- CodeAttributeArgumentCollection.cs
- RoleGroupCollection.cs
- StylusDownEventArgs.cs
- SQLInt64Storage.cs
- Random.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- RectAnimation.cs
- GlyphingCache.cs
- FixedBufferAttribute.cs
- ListControlDesigner.cs
- TextFormatterImp.cs
- WebServiceMethodData.cs
- validationstate.cs
- ElementsClipboardData.cs
- PrePrepareMethodAttribute.cs
- StylusPointPropertyInfo.cs
- ProfileProvider.cs
- SafeNativeMethods.cs