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
- SQLBytes.cs
- ToolstripProfessionalRenderer.cs
- XPathNavigatorKeyComparer.cs
- TreeNode.cs
- LayoutManager.cs
- ValidateNames.cs
- ExpressionConverter.cs
- DoubleAnimationUsingPath.cs
- CodeDomLoader.cs
- ListViewItem.cs
- CodeComment.cs
- X509ClientCertificateAuthenticationElement.cs
- PageAsyncTask.cs
- _WinHttpWebProxyDataBuilder.cs
- ObjectConverter.cs
- Parser.cs
- DynamicResourceExtensionConverter.cs
- DataBindingExpressionBuilder.cs
- StructureChangedEventArgs.cs
- MethodCallTranslator.cs
- Int16KeyFrameCollection.cs
- login.cs
- VirtualDirectoryMappingCollection.cs
- VariableQuery.cs
- StrongNameMembershipCondition.cs
- CompensationDesigner.cs
- XomlCompilerParameters.cs
- ApplicationProxyInternal.cs
- Models.cs
- GeneralTransform2DTo3D.cs
- EventDescriptor.cs
- IteratorFilter.cs
- HGlobalSafeHandle.cs
- WindowsTreeView.cs
- MailMessage.cs
- ServerIdentity.cs
- Scripts.cs
- Image.cs
- ContentWrapperAttribute.cs
- FreezableCollection.cs
- ManipulationDelta.cs
- SelectingProviderEventArgs.cs
- ProviderSettings.cs
- ProcessInfo.cs
- Animatable.cs
- InternalResources.cs
- StringComparer.cs
- StringInfo.cs
- AutoResizedEvent.cs
- CapabilitiesUse.cs
- xmlsaver.cs
- GridViewPageEventArgs.cs
- CaseInsensitiveOrdinalStringComparer.cs
- TextServicesDisplayAttribute.cs
- QueueProcessor.cs
- PreviewPageInfo.cs
- DataServiceRequest.cs
- IsolatedStorageFilePermission.cs
- BinaryFormatter.cs
- _IPv6Address.cs
- TextSelectionHighlightLayer.cs
- ResolvedKeyFrameEntry.cs
- IconHelper.cs
- ListItemCollection.cs
- ContextBase.cs
- ListViewTableRow.cs
- TracingConnection.cs
- CodeParameterDeclarationExpression.cs
- GlyphElement.cs
- ForeignKeyConstraint.cs
- FloaterParaClient.cs
- SecurityUniqueId.cs
- IndentedWriter.cs
- _Rfc2616CacheValidators.cs
- ResourceReferenceExpression.cs
- ImageCollectionEditor.cs
- SEHException.cs
- SimpleApplicationHost.cs
- TranslateTransform3D.cs
- DetailsViewDeletedEventArgs.cs
- HtmlInputReset.cs
- CommandField.cs
- MsmqChannelFactory.cs
- RepeaterCommandEventArgs.cs
- DbProviderFactory.cs
- SessionStateContainer.cs
- SqlDataRecord.cs
- BaseCodeDomTreeGenerator.cs
- ObjectDataSourceDisposingEventArgs.cs
- ComPlusContractBehavior.cs
- SQLInt64.cs
- BuildProviderCollection.cs
- DynamicPropertyHolder.cs
- BufferedOutputStream.cs
- StringSource.cs
- HttpInputStream.cs
- X509ScopedServiceCertificateElement.cs
- UnaryExpressionHelper.cs
- DockPattern.cs
- MetadataItemEmitter.cs