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
- AttributeParameterInfo.cs
- SslStreamSecurityElement.cs
- Executor.cs
- InternalException.cs
- StatusBarPanel.cs
- BulletChrome.cs
- SchemaImporterExtensionElementCollection.cs
- KeyValuePair.cs
- DataGridDesigner.cs
- TracingConnectionListener.cs
- ProfileBuildProvider.cs
- PointConverter.cs
- PointConverter.cs
- WebPartZoneCollection.cs
- CodeRemoveEventStatement.cs
- SrgsDocument.cs
- DesignOnlyAttribute.cs
- TransformGroup.cs
- ClientSettingsStore.cs
- DecoderExceptionFallback.cs
- FontSizeConverter.cs
- AssemblyAssociatedContentFileAttribute.cs
- ToolboxItemFilterAttribute.cs
- EnumUnknown.cs
- AuthenticationSection.cs
- figurelength.cs
- Renderer.cs
- graph.cs
- KeyBinding.cs
- RuntimeConfigurationRecord.cs
- DataSet.cs
- Message.cs
- MemberMaps.cs
- unsafenativemethodstextservices.cs
- RuntimeHelpers.cs
- TemplateComponentConnector.cs
- SuppressMessageAttribute.cs
- StringBuilder.cs
- WrappedIUnknown.cs
- HandlerBase.cs
- sqlmetadatafactory.cs
- AsymmetricKeyExchangeDeformatter.cs
- XsdCachingReader.cs
- TableCell.cs
- SystemIPv6InterfaceProperties.cs
- OdbcStatementHandle.cs
- TabletDevice.cs
- DoubleLinkList.cs
- SqlGenericUtil.cs
- Encoder.cs
- XmlSchemaFacet.cs
- MethodExpr.cs
- TablePatternIdentifiers.cs
- ConnectionManagementElementCollection.cs
- ScriptManager.cs
- FormCollection.cs
- SocketManager.cs
- CharAnimationUsingKeyFrames.cs
- TreeViewHitTestInfo.cs
- ComponentFactoryHelpers.cs
- ElementsClipboardData.cs
- Rect3DValueSerializer.cs
- CompilationPass2Task.cs
- WizardSideBarListControlItem.cs
- EnterpriseServicesHelper.cs
- AuthenticatedStream.cs
- FrameworkTemplate.cs
- ImageMap.cs
- TaskScheduler.cs
- SignatureDescription.cs
- SerializerProvider.cs
- FileLevelControlBuilderAttribute.cs
- ToolboxItem.cs
- XmlNullResolver.cs
- XmlImplementation.cs
- WindowsFormsDesignerOptionService.cs
- ToolStripDropTargetManager.cs
- QilXmlReader.cs
- RepeaterItem.cs
- CompiledIdentityConstraint.cs
- SqlStatistics.cs
- TransactionValidationBehavior.cs
- TextParagraphView.cs
- TypeElement.cs
- OneToOneMappingSerializer.cs
- ZipQueryOperator.cs
- UIAgentAsyncEndRequest.cs
- Collection.cs
- ErrorFormatter.cs
- DbDataRecord.cs
- ManagementDateTime.cs
- WSDualHttpSecurityMode.cs
- COM2PictureConverter.cs
- MinMaxParagraphWidth.cs
- XamlBrushSerializer.cs
- Point3DCollection.cs
- DtrList.cs
- RuleInfoComparer.cs
- RSAOAEPKeyExchangeFormatter.cs
- Native.cs