Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / Monitoring / system / Diagnosticts / EventData.cs / 1305376 / 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
- DrawingImage.cs
- SessionEndingCancelEventArgs.cs
- TypefaceMap.cs
- SqlDataSourceDesigner.cs
- AssemblyResourceLoader.cs
- XhtmlConformanceSection.cs
- ClearTypeHintValidation.cs
- BindToObject.cs
- KnownBoxes.cs
- PrivateFontCollection.cs
- TextEncodedRawTextWriter.cs
- RectKeyFrameCollection.cs
- namescope.cs
- PageRanges.cs
- precedingquery.cs
- JavaScriptObjectDeserializer.cs
- SessionStateContainer.cs
- ErrorFormatter.cs
- CatalogZone.cs
- SystemColors.cs
- ProfileInfo.cs
- StateChangeEvent.cs
- SelectionRange.cs
- WebPartEditVerb.cs
- Ops.cs
- TextTreeTextBlock.cs
- NullReferenceException.cs
- ExternalFile.cs
- WinInetCache.cs
- Pick.cs
- ISO2022Encoding.cs
- XslException.cs
- MediaScriptCommandRoutedEventArgs.cs
- UrlAuthorizationModule.cs
- PolygonHotSpot.cs
- EnglishPluralizationService.cs
- Compiler.cs
- BulletedListEventArgs.cs
- ColumnHeaderConverter.cs
- XmlSchemaSimpleTypeUnion.cs
- TrackingConditionCollection.cs
- Configuration.cs
- ControlAdapter.cs
- CountAggregationOperator.cs
- AutomationPropertyInfo.cs
- BinaryFormatterSinks.cs
- RewritingProcessor.cs
- MasterPage.cs
- ListView.cs
- DesignerSerializationOptionsAttribute.cs
- OverrideMode.cs
- SecurityPermission.cs
- CredentialCache.cs
- Listbox.cs
- Nodes.cs
- SendActivity.cs
- SafeMarshalContext.cs
- InputProcessorProfilesLoader.cs
- SchemaContext.cs
- DropShadowBitmapEffect.cs
- OdbcException.cs
- ParameterCollection.cs
- GC.cs
- WindowsListViewGroupSubsetLink.cs
- EntityUtil.cs
- CheckBoxField.cs
- AutoResizedEvent.cs
- SHA1.cs
- Opcode.cs
- documentation.cs
- ObjectView.cs
- View.cs
- HtmlTableCellCollection.cs
- ItemDragEvent.cs
- ConstrainedDataObject.cs
- SymDocumentType.cs
- TraceInternal.cs
- ZipIOExtraFieldElement.cs
- NamespaceEmitter.cs
- ListenerSingletonConnectionReader.cs
- Delay.cs
- RecipientInfo.cs
- ProxyWebPartConnectionCollection.cs
- ConfigPathUtility.cs
- CqlLexerHelpers.cs
- XmlSyndicationContent.cs
- XmlDictionaryReaderQuotasElement.cs
- XmlStrings.cs
- WhitespaceRuleReader.cs
- Trace.cs
- RefExpr.cs
- CompositeActivityTypeDescriptor.cs
- BorderGapMaskConverter.cs
- PropertyValue.cs
- XmlnsDefinitionAttribute.cs
- StreamReader.cs
- ExtendedPropertyDescriptor.cs
- BaseCollection.cs
- CheckBoxList.cs
- DoubleAnimationUsingKeyFrames.cs