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
- DispatcherHooks.cs
- ScriptRef.cs
- CodeCatchClause.cs
- SharedPerformanceCounter.cs
- EarlyBoundInfo.cs
- ParameterRetriever.cs
- FixedSOMTableRow.cs
- GiveFeedbackEvent.cs
- HashRepartitionEnumerator.cs
- GenericTextProperties.cs
- Crc32Helper.cs
- MultiAsyncResult.cs
- updateconfighost.cs
- SrgsRuleRef.cs
- BinaryWriter.cs
- ContractInferenceHelper.cs
- ArrayElementGridEntry.cs
- NotImplementedException.cs
- CaseInsensitiveComparer.cs
- TabOrder.cs
- SqlTriggerAttribute.cs
- RegexInterpreter.cs
- RegexMatch.cs
- InvariantComparer.cs
- EventHandlersStore.cs
- CornerRadiusConverter.cs
- ThicknessAnimation.cs
- InputScope.cs
- WhitespaceRuleReader.cs
- OdbcParameterCollection.cs
- DialogWindow.cs
- SqlMethodAttribute.cs
- ListViewGroupConverter.cs
- SimplePropertyEntry.cs
- Timer.cs
- DispatchOperationRuntime.cs
- InvalidPrinterException.cs
- ConfigurationException.cs
- SafeHandles.cs
- DeviceFiltersSection.cs
- RegexMatch.cs
- FormViewDeleteEventArgs.cs
- SizeAnimation.cs
- ToolboxComponentsCreatedEventArgs.cs
- TypeDependencyAttribute.cs
- FilterableAttribute.cs
- dsa.cs
- ChangeProcessor.cs
- RequestQueryParser.cs
- SymbolTable.cs
- DBParameter.cs
- SpecularMaterial.cs
- WebPartDeleteVerb.cs
- ListViewContainer.cs
- ToolStripRenderer.cs
- InstanceHandleReference.cs
- DataColumnSelectionConverter.cs
- _TLSstream.cs
- SwitchExpression.cs
- ClientScriptManagerWrapper.cs
- RightsManagementEncryptionTransform.cs
- Site.cs
- StateItem.cs
- ArrayExtension.cs
- XmlUnspecifiedAttribute.cs
- CompiledQuery.cs
- PublisherIdentityPermission.cs
- SqlDuplicator.cs
- Number.cs
- Serialization.cs
- DBProviderConfigurationHandler.cs
- XmlSiteMapProvider.cs
- GlobalItem.cs
- UpDownBase.cs
- SapiAttributeParser.cs
- StringArrayConverter.cs
- CodeNamespaceImportCollection.cs
- CompilerCollection.cs
- ColorComboBox.cs
- XmlSerializerImportOptions.cs
- Command.cs
- InlineCollection.cs
- ThemeDirectoryCompiler.cs
- XmlSerializationWriter.cs
- RectangleGeometry.cs
- ThemeInfoAttribute.cs
- DerivedKeyCachingSecurityTokenSerializer.cs
- FileLevelControlBuilderAttribute.cs
- WindowsGrip.cs
- RequestSecurityTokenResponse.cs
- CurrencyWrapper.cs
- XPathAncestorIterator.cs
- sqlcontext.cs
- TypeHelper.cs
- DiscoveryEndpoint.cs
- WSHttpSecurity.cs
- XmlDocumentViewSchema.cs
- PrimitiveXmlSerializers.cs
- MemberAssignment.cs
- MergeFilterQuery.cs