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
- TableCell.cs
- TraceRecord.cs
- ProcessHostFactoryHelper.cs
- WebServiceErrorEvent.cs
- DesignerOptionService.cs
- PeerResolverSettings.cs
- SizeValueSerializer.cs
- SmiMetaData.cs
- PolyLineSegment.cs
- Activator.cs
- HttpCapabilitiesEvaluator.cs
- TextParagraphCache.cs
- KoreanLunisolarCalendar.cs
- BuildProviderAppliesToAttribute.cs
- HMACSHA256.cs
- Merger.cs
- FormatterConverter.cs
- PreProcessor.cs
- DrawingCollection.cs
- ConfigurationSectionCollection.cs
- RangeValidator.cs
- TemplateAction.cs
- AdRotator.cs
- CompareInfo.cs
- OrthographicCamera.cs
- SingleSelectRootGridEntry.cs
- CommandConverter.cs
- UpdatableWrapper.cs
- CommonProperties.cs
- UnicodeEncoding.cs
- SafeLibraryHandle.cs
- DataGridColumnHeaderItemAutomationPeer.cs
- AuthenticationSection.cs
- DesignTimeTemplateParser.cs
- MultiSelector.cs
- KeyboardDevice.cs
- GeometryConverter.cs
- ObjectView.cs
- MenuAutomationPeer.cs
- RepeatInfo.cs
- COM2PictureConverter.cs
- FixedTextBuilder.cs
- TextBoxRenderer.cs
- HttpApplicationFactory.cs
- CodeExporter.cs
- VisualProxy.cs
- QilInvoke.cs
- WebBrowserProgressChangedEventHandler.cs
- HighlightComponent.cs
- StagingAreaInputItem.cs
- Dynamic.cs
- StringBuilder.cs
- SpecularMaterial.cs
- uribuilder.cs
- SQLInt32.cs
- CancelRequestedRecord.cs
- TouchFrameEventArgs.cs
- Fonts.cs
- ObjectDataSourceMethodEventArgs.cs
- ReadOnlyObservableCollection.cs
- CompilerWrapper.cs
- RemotingConfigParser.cs
- ListViewItem.cs
- CodeTypeConstructor.cs
- SqlBinder.cs
- RichTextBox.cs
- CorrelationRequestContext.cs
- ClientFormsIdentity.cs
- TargetParameterCountException.cs
- LicenseProviderAttribute.cs
- TransformGroup.cs
- MSAANativeProvider.cs
- _PooledStream.cs
- RowBinding.cs
- DesignDataSource.cs
- FileNameEditor.cs
- DefinitionUpdate.cs
- WorkflowDesignerColors.cs
- ComponentConverter.cs
- DataSetMappper.cs
- ClientRuntimeConfig.cs
- ACE.cs
- HtmlInputFile.cs
- SqlDataReader.cs
- ParseHttpDate.cs
- DelimitedListTraceListener.cs
- AVElementHelper.cs
- Model3DGroup.cs
- ActivatedMessageQueue.cs
- ZipIOModeEnforcingStream.cs
- WebPartHeaderCloseVerb.cs
- SpanIndex.cs
- AnnotationService.cs
- PersonalizationStateInfo.cs
- TimelineCollection.cs
- TemplateControlCodeDomTreeGenerator.cs
- PropertyDescriptor.cs
- PrimaryKeyTypeConverter.cs
- AnnotationStore.cs
- EncoderParameters.cs