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
- LinqDataSourceUpdateEventArgs.cs
- ProfilePropertyNameValidator.cs
- ExecutionTracker.cs
- XmlStreamStore.cs
- ZoneLinkButton.cs
- NumericUpDownAcceleration.cs
- ZipFileInfoCollection.cs
- SoapInteropTypes.cs
- SkewTransform.cs
- CompilerCollection.cs
- TextEditorContextMenu.cs
- HostingEnvironmentSection.cs
- HtmlButton.cs
- ObjectSpanRewriter.cs
- RegexWriter.cs
- XmlSignatureProperties.cs
- BufferModesCollection.cs
- UndoUnit.cs
- ToolStripContentPanelRenderEventArgs.cs
- OdbcCommand.cs
- WriterOutput.cs
- NativeMethods.cs
- AuthenticateEventArgs.cs
- CompilerGlobalScopeAttribute.cs
- TextBreakpoint.cs
- PropertyEmitter.cs
- WebServiceEnumData.cs
- IndentedWriter.cs
- XmlSchemaAnnotated.cs
- JournalEntryListConverter.cs
- Cursors.cs
- TransactionState.cs
- HeaderCollection.cs
- LinqDataSourceInsertEventArgs.cs
- NavigationProperty.cs
- ScrollItemProviderWrapper.cs
- GridToolTip.cs
- FocusWithinProperty.cs
- PropertyEmitterBase.cs
- CharKeyFrameCollection.cs
- QueryOptionExpression.cs
- StylusEditingBehavior.cs
- UnitySerializationHolder.cs
- HtmlDocument.cs
- AstNode.cs
- ObjectReferenceStack.cs
- Component.cs
- AuthenticationConfig.cs
- PageCatalogPart.cs
- TextSearch.cs
- SpeechEvent.cs
- LineBreak.cs
- TableCell.cs
- TypedElement.cs
- SelectionRangeConverter.cs
- ObjectHandle.cs
- MiniConstructorInfo.cs
- DataBindingHandlerAttribute.cs
- TokenFactoryCredential.cs
- ShaderEffect.cs
- OleDbErrorCollection.cs
- TransactedBatchingBehavior.cs
- DetailsViewCommandEventArgs.cs
- SimpleRecyclingCache.cs
- FilterableAttribute.cs
- MultiSelectRootGridEntry.cs
- QueryException.cs
- ValueTable.cs
- WebHttpBinding.cs
- ObservableCollection.cs
- DataSourceHelper.cs
- HtmlInputText.cs
- ThrowHelper.cs
- ArcSegment.cs
- ValueSerializer.cs
- IdentityNotMappedException.cs
- XmlReader.cs
- XmlSchemaComplexContentRestriction.cs
- MD5CryptoServiceProvider.cs
- NotifyCollectionChangedEventArgs.cs
- SspiSecurityTokenParameters.cs
- PreloadHost.cs
- SHA256.cs
- DataGridViewButtonColumn.cs
- TimeoutException.cs
- XmlSchemas.cs
- shaperfactoryquerycachekey.cs
- WhitespaceRuleReader.cs
- InputLangChangeRequestEvent.cs
- DesigntimeLicenseContext.cs
- ThrowHelper.cs
- DataColumnSelectionConverter.cs
- WorkItem.cs
- DispatcherFrame.cs
- TimerElapsedEvenArgs.cs
- WebPartsPersonalizationAuthorization.cs
- DeadCharTextComposition.cs
- DirectoryInfo.cs
- GenericTypeParameterBuilder.cs
- BuildManagerHost.cs