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
- PageBuildProvider.cs
- ForceCopyBuildProvider.cs
- SqlVersion.cs
- LineProperties.cs
- QueryableDataSourceHelper.cs
- DeploymentSection.cs
- SchemaEntity.cs
- Dump.cs
- DataBindingCollection.cs
- FileLogRecord.cs
- XmlEventCache.cs
- wgx_sdk_version.cs
- SystemIPGlobalProperties.cs
- QuaternionAnimation.cs
- XmlElementElementCollection.cs
- SessionPageStatePersister.cs
- TextEditorThreadLocalStore.cs
- MembershipPasswordException.cs
- RectAnimationUsingKeyFrames.cs
- BitmapMetadataBlob.cs
- SettingsPropertyValue.cs
- EntityTypeBase.cs
- XmlDataLoader.cs
- DataGridPagerStyle.cs
- StringFormat.cs
- OleDbReferenceCollection.cs
- EntityClientCacheEntry.cs
- ContentType.cs
- HttpClientProtocol.cs
- StatusBar.cs
- Quaternion.cs
- FileDialog.cs
- EndOfStreamException.cs
- ExitEventArgs.cs
- XmlTextReaderImpl.cs
- NamedObject.cs
- ReceiveContextCollection.cs
- WaitHandle.cs
- XmlSchemaNotation.cs
- SQLInt32Storage.cs
- ExitEventArgs.cs
- HtmlPhoneCallAdapter.cs
- DoubleConverter.cs
- Stack.cs
- SafeFindHandle.cs
- SubpageParagraph.cs
- ToolboxItemAttribute.cs
- Signature.cs
- BaseDataList.cs
- ValidationErrorCollection.cs
- RSAOAEPKeyExchangeDeformatter.cs
- SqlCacheDependencySection.cs
- Socket.cs
- Form.cs
- SelectionPattern.cs
- ProxyFragment.cs
- SelectionEditingBehavior.cs
- GCHandleCookieTable.cs
- RemoteWebConfigurationHost.cs
- ListViewItem.cs
- DaylightTime.cs
- ProxyHelper.cs
- DataView.cs
- ReaderContextStackData.cs
- StdValidatorsAndConverters.cs
- ToolStripItemGlyph.cs
- Rule.cs
- Stack.cs
- FastPropertyAccessor.cs
- WpfPayload.cs
- StylusCaptureWithinProperty.cs
- WinFormsComponentEditor.cs
- ByteStack.cs
- SqlWebEventProvider.cs
- NativeMethods.cs
- Msmq3PoisonHandler.cs
- DockPattern.cs
- OdbcDataReader.cs
- Stylesheet.cs
- SqlConnectionPoolProviderInfo.cs
- RemotingConfiguration.cs
- BinaryConverter.cs
- ThousandthOfEmRealDoubles.cs
- TargetControlTypeAttribute.cs
- StateBag.cs
- SiteMembershipCondition.cs
- GPPOINTF.cs
- MenuItemBinding.cs
- ProcessInputEventArgs.cs
- wpf-etw.cs
- NameValueSectionHandler.cs
- Compiler.cs
- httpstaticobjectscollection.cs
- WebProxyScriptElement.cs
- SafeHandle.cs
- EventSetter.cs
- XmlWrappingReader.cs
- GrammarBuilder.cs
- CatalogZone.cs
- StringArrayEditor.cs