Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Services / Monitoring / system / Diagnosticts / EventData.cs / 1 / EventData.cs
using System.ComponentModel; using System.Security.Permissions; using System.Security; namespace System.Diagnostics { public class EventInstance { private int _categoryNumber; private EventLogEntryType _entryType = EventLogEntryType.Information; private long _instanceId; public EventInstance(long instanceId, int categoryId) { CategoryId = categoryId; InstanceId = instanceId; } public EventInstance(long instanceId, int categoryId, EventLogEntryType entryType) : this (instanceId, categoryId) { EntryType = entryType; } public int CategoryId { get { return _categoryNumber; } set { if (value > UInt16.MaxValue || value < 0) throw new ArgumentOutOfRangeException("value"); _categoryNumber = value; } } public EventLogEntryType EntryType { get { return _entryType; } set { if (!Enum.IsDefined(typeof(EventLogEntryType), value)) throw new InvalidEnumArgumentException("value", (int)value, typeof(EventLogEntryType)); _entryType = value; } } public long InstanceId { get { return _instanceId; } set { if (value > UInt32.MaxValue || value < 0) throw new ArgumentOutOfRangeException("value"); _instanceId = value; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System.ComponentModel; using System.Security.Permissions; using System.Security; namespace System.Diagnostics { public class EventInstance { private int _categoryNumber; private EventLogEntryType _entryType = EventLogEntryType.Information; private long _instanceId; public EventInstance(long instanceId, int categoryId) { CategoryId = categoryId; InstanceId = instanceId; } public EventInstance(long instanceId, int categoryId, EventLogEntryType entryType) : this (instanceId, categoryId) { EntryType = entryType; } public int CategoryId { get { return _categoryNumber; } set { if (value > UInt16.MaxValue || value < 0) throw new ArgumentOutOfRangeException("value"); _categoryNumber = value; } } public EventLogEntryType EntryType { get { return _entryType; } set { if (!Enum.IsDefined(typeof(EventLogEntryType), value)) throw new InvalidEnumArgumentException("value", (int)value, typeof(EventLogEntryType)); _entryType = value; } } public long InstanceId { get { return _instanceId; } set { if (value > UInt32.MaxValue || value < 0) throw new ArgumentOutOfRangeException("value"); _instanceId = value; } } } } // 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
- PropertyInformation.cs
- ProcessHostFactoryHelper.cs
- ProcessStartInfo.cs
- GradientStop.cs
- EntityTypeEmitter.cs
- BackgroundFormatInfo.cs
- InfoCardXmlSerializer.cs
- DBBindings.cs
- XmlTextReaderImplHelpers.cs
- ClientBuildManagerCallback.cs
- FontWeights.cs
- AtomMaterializer.cs
- StateManagedCollection.cs
- SortKey.cs
- DesignerAdapterUtil.cs
- LogFlushAsyncResult.cs
- UnaryExpression.cs
- BrowserDefinitionCollection.cs
- QilFunction.cs
- ScriptingSectionGroup.cs
- SecureUICommand.cs
- DrawListViewSubItemEventArgs.cs
- SiteMap.cs
- Paragraph.cs
- XmlReader.cs
- TypeUtil.cs
- MenuItemCollectionEditor.cs
- OrthographicCamera.cs
- WebPartConnectVerb.cs
- StreamInfo.cs
- ResponseBodyWriter.cs
- DataListItem.cs
- ObsoleteAttribute.cs
- StreamWithDictionary.cs
- Size3D.cs
- AssemblyInfo.cs
- RSACryptoServiceProvider.cs
- CompositeActivityValidator.cs
- OperationCanceledException.cs
- PassportAuthentication.cs
- HttpRequestCacheValidator.cs
- ByeOperation11AsyncResult.cs
- QuestionEventArgs.cs
- PeerToPeerException.cs
- DetailsViewDeletedEventArgs.cs
- EntryPointNotFoundException.cs
- QuaternionAnimationUsingKeyFrames.cs
- UseAttributeSetsAction.cs
- DataGridViewColumnCollectionDialog.cs
- SslStream.cs
- TextFormatterHost.cs
- SchemeSettingElement.cs
- IPCCacheManager.cs
- ADMembershipUser.cs
- COM2Properties.cs
- ConnectionConsumerAttribute.cs
- WarningException.cs
- RegexTree.cs
- RotationValidation.cs
- RichTextBox.cs
- AudioFormatConverter.cs
- GenericRootAutomationPeer.cs
- DiscoveryClientChannelBase.cs
- DictionaryBase.cs
- AutomationPropertyInfo.cs
- FamilyMapCollection.cs
- DateTimeValueSerializerContext.cs
- UnionCodeGroup.cs
- WorkflowViewService.cs
- UnknownBitmapDecoder.cs
- UnsafeNativeMethods.cs
- WSUtilitySpecificationVersion.cs
- LinqDataSourceHelper.cs
- PeerNearMe.cs
- ContentAlignmentEditor.cs
- PropertyChangingEventArgs.cs
- FixedBufferAttribute.cs
- HostedImpersonationContext.cs
- ShaderRenderModeValidation.cs
- Attributes.cs
- SoapReflectionImporter.cs
- ReflectionUtil.cs
- LocalFileSettingsProvider.cs
- ConfigurationSectionGroup.cs
- XmlSiteMapProvider.cs
- BaseCollection.cs
- DefaultTextStore.cs
- UserControl.cs
- Internal.cs
- DBCommandBuilder.cs
- ImageDesigner.cs
- D3DImage.cs
- XmlIncludeAttribute.cs
- SpeakProgressEventArgs.cs
- Vector3dCollection.cs
- PeerApplicationLaunchInfo.cs
- WebScriptClientGenerator.cs
- ResourceIDHelper.cs
- MetaType.cs
- DependencyObjectProvider.cs