Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Administration / AppDomainInfo.cs / 1 / AppDomainInfo.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Administration { using System; using System.Diagnostics; using System.Runtime.Serialization; internal sealed class AppDomainInfo { static object syncRoot = new object(); static AppDomainInfo singleton; Guid instanceId; string friendlyName; bool isDefaultAppDomain; string processName; string machineName; int processId; int id; AppDomainInfo(AppDomain appDomain) { // Assumption: Only one AppDomainInfo is created per AppDomain DiagnosticUtility.DebugAssert(null != appDomain, ""); this.instanceId = Guid.NewGuid(); this.friendlyName = appDomain.FriendlyName; this.isDefaultAppDomain = appDomain.IsDefaultAppDomain(); Process process = Process.GetCurrentProcess(); this.processName = process.ProcessName; this.machineName = Environment.MachineName; this.processId = process.Id; this.id = appDomain.Id; } public int Id { get { return this.id; } } public Guid InstanceId { get { return this.instanceId; } } public string MachineName { get { return this.machineName; } } public string Name { get { return this.friendlyName; } } public bool IsDefaultAppDomain { get { return this.isDefaultAppDomain; } } public int ProcessId { get { return this.processId; } } public string ProcessName { get { return this.processName; } } internal static AppDomainInfo Current { get { if (null == singleton) { lock (AppDomainInfo.syncRoot) { if (null == singleton) { singleton = new AppDomainInfo(AppDomain.CurrentDomain); } } } return singleton; } } } } // 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
- ListViewItemCollectionEditor.cs
- SspiSecurityTokenProvider.cs
- WindowHideOrCloseTracker.cs
- configsystem.cs
- Document.cs
- Rotation3DAnimationBase.cs
- BrowserTree.cs
- DocumentGridPage.cs
- EditorPart.cs
- SafeFileMappingHandle.cs
- GenericAuthenticationEventArgs.cs
- DataGrid.cs
- FileDialogCustomPlacesCollection.cs
- NativeMethods.cs
- _IPv6Address.cs
- BamlLocalizer.cs
- SafeRegistryHandle.cs
- UrlAuthFailedErrorFormatter.cs
- TreeNodeStyle.cs
- Thickness.cs
- Point3D.cs
- CookieParameter.cs
- SoapSchemaImporter.cs
- ScriptManager.cs
- EmissiveMaterial.cs
- ModuleConfigurationInfo.cs
- EmptyEnumerator.cs
- AvTraceDetails.cs
- SourceFilter.cs
- AuthenticatedStream.cs
- MappingSource.cs
- TextFormatterContext.cs
- CryptographicAttribute.cs
- sitestring.cs
- CodeVariableDeclarationStatement.cs
- OleDbCommand.cs
- DynamicRenderer.cs
- TextTreeTextElementNode.cs
- mediapermission.cs
- MessageQueuePermissionAttribute.cs
- SslStream.cs
- COM2TypeInfoProcessor.cs
- DataGridViewCellStyleConverter.cs
- MediaTimeline.cs
- CapabilitiesState.cs
- InstanceLockLostException.cs
- prompt.cs
- XhtmlBasicLabelAdapter.cs
- AvTrace.cs
- SQLInt32Storage.cs
- XsdBuilder.cs
- DropShadowEffect.cs
- PanelStyle.cs
- FixedTextView.cs
- RoleService.cs
- X509Chain.cs
- BypassElement.cs
- InstanceOwnerException.cs
- SQLResource.cs
- FixedPageAutomationPeer.cs
- RuntimeHelpers.cs
- TypeResolvingOptions.cs
- XPathScanner.cs
- XmlStrings.cs
- CheckBox.cs
- SendActivityDesigner.cs
- HwndHostAutomationPeer.cs
- DesignTableCollection.cs
- ProbeMatchesApril2005.cs
- ListViewDataItem.cs
- RegexCharClass.cs
- HttpCacheVaryByContentEncodings.cs
- EventLog.cs
- CodeConditionStatement.cs
- AdapterUtil.cs
- HatchBrush.cs
- AmbiguousMatchException.cs
- DataStorage.cs
- FSWPathEditor.cs
- XmlTypeAttribute.cs
- WebHttpDispatchOperationSelectorData.cs
- TextPointerBase.cs
- SrgsOneOf.cs
- Literal.cs
- ImagingCache.cs
- GeneralTransform2DTo3DTo2D.cs
- DbConnectionStringCommon.cs
- DSASignatureDeformatter.cs
- HotSpot.cs
- Function.cs
- DataGridColumnCollection.cs
- HttpInputStream.cs
- ConfigUtil.cs
- XmlLinkedNode.cs
- FilterQuery.cs
- PersistenceIOParticipant.cs
- WebSysDisplayNameAttribute.cs
- Normalization.cs
- MasterPageCodeDomTreeGenerator.cs
- BitmapEffectCollection.cs