Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- HitTestWithGeometryDrawingContextWalker.cs
- ObjectItemAssemblyLoader.cs
- DataBoundControlHelper.cs
- DeclarativeCatalogPart.cs
- EtwTrace.cs
- ProcessExitedException.cs
- ApplyImportsAction.cs
- CollectionChangedEventManager.cs
- WebPartTransformerAttribute.cs
- ECDiffieHellman.cs
- SemaphoreFullException.cs
- HitTestDrawingContextWalker.cs
- CodeMethodMap.cs
- SafeCoTaskMem.cs
- CompositeFontFamily.cs
- XmlSignatureManifest.cs
- CompilerState.cs
- StructuralObject.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- WsatRegistrationHeader.cs
- LocationInfo.cs
- GroupBoxAutomationPeer.cs
- SmtpSection.cs
- Socket.cs
- HttpDebugHandler.cs
- SHA512Cng.cs
- DiagnosticTraceSchemas.cs
- PopupRoot.cs
- FixedDocumentSequencePaginator.cs
- DataView.cs
- DesignerVerb.cs
- Operand.cs
- ClientEventManager.cs
- NativeWindow.cs
- WebException.cs
- LineBreak.cs
- ListControlConvertEventArgs.cs
- IndexOutOfRangeException.cs
- UnsafeNativeMethodsPenimc.cs
- CollectionView.cs
- XmlC14NWriter.cs
- Button.cs
- TransformProviderWrapper.cs
- SequentialWorkflowRootDesigner.cs
- CompoundFileStorageReference.cs
- _TransmitFileOverlappedAsyncResult.cs
- BCLDebug.cs
- _WebProxyDataBuilder.cs
- CategoryAttribute.cs
- ComAdminWrapper.cs
- ErrorWebPart.cs
- _CookieModule.cs
- ConnectionConsumerAttribute.cs
- DataGridCellInfo.cs
- VerificationAttribute.cs
- HandlerFactoryCache.cs
- ToolStripPanelCell.cs
- InfoCardProofToken.cs
- FullTextState.cs
- MDIClient.cs
- PowerStatus.cs
- ParserExtension.cs
- StylusCollection.cs
- LogRecordSequence.cs
- XmlObjectSerializerReadContextComplex.cs
- _LazyAsyncResult.cs
- SettingsBase.cs
- Collection.cs
- OleDbParameter.cs
- InternalConfigHost.cs
- RightsManagementEncryptedStream.cs
- ReadOnlyTernaryTree.cs
- NavigationEventArgs.cs
- CmsUtils.cs
- VisualStyleTypesAndProperties.cs
- TabItemWrapperAutomationPeer.cs
- NativeWrapper.cs
- MessageSmuggler.cs
- dbdatarecord.cs
- _SafeNetHandles.cs
- Switch.cs
- CodeSubDirectoriesCollection.cs
- BooleanAnimationBase.cs
- ChooseAction.cs
- SqlFunctionAttribute.cs
- RightsManagementInformation.cs
- XmlQueryRuntime.cs
- DictionaryEntry.cs
- Filter.cs
- HealthMonitoringSection.cs
- IdnMapping.cs
- DataTableNewRowEvent.cs
- ValidationHelper.cs
- SettingsPropertyNotFoundException.cs
- TypeKeyValue.cs
- ClientSponsor.cs
- MultiBindingExpression.cs
- HeaderCollection.cs
- SymmetricKey.cs
- UnsafeNativeMethods.cs