Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- SQLByte.cs
- CalendarAutomationPeer.cs
- StretchValidation.cs
- TypeSystemProvider.cs
- TypeContext.cs
- ObjectListCommand.cs
- DataServiceQuery.cs
- SecurityPermission.cs
- TreeNodeBinding.cs
- ClientFormsIdentity.cs
- ObjectManager.cs
- HttpListenerContext.cs
- Automation.cs
- StringValidatorAttribute.cs
- MasterPage.cs
- CodeIndexerExpression.cs
- SQLInt32Storage.cs
- XamlWriter.cs
- SelectionItemPattern.cs
- AdRotator.cs
- DropDownButton.cs
- CroppedBitmap.cs
- ConfigUtil.cs
- WasAdminWrapper.cs
- PageCodeDomTreeGenerator.cs
- GeneralTransform.cs
- DefaultEventAttribute.cs
- EncodingDataItem.cs
- ChoiceConverter.cs
- XamlPoint3DCollectionSerializer.cs
- Debugger.cs
- ToggleProviderWrapper.cs
- ValidationHelpers.cs
- BinaryNode.cs
- VisualStyleInformation.cs
- MeasurementDCInfo.cs
- XamlReaderConstants.cs
- PointLight.cs
- latinshape.cs
- SiteMembershipCondition.cs
- TextSelection.cs
- CollectionAdapters.cs
- CheckBoxList.cs
- PreProcessor.cs
- DecimalConverter.cs
- AstNode.cs
- EncodingFallbackAwareXmlTextWriter.cs
- WebConfigurationHostFileChange.cs
- HttpGetServerProtocol.cs
- EdmRelationshipRoleAttribute.cs
- ArraySet.cs
- RepeatInfo.cs
- BindingContext.cs
- NameTable.cs
- DataMemberAttribute.cs
- Size3D.cs
- DataGridHeaderBorder.cs
- GridProviderWrapper.cs
- XmlLanguageConverter.cs
- AnimationClockResource.cs
- SystemInfo.cs
- HtmlFormWrapper.cs
- LineServicesRun.cs
- HtmlElementErrorEventArgs.cs
- MetabaseSettingsIis7.cs
- _ScatterGatherBuffers.cs
- DispatchWrapper.cs
- ToolStripContainer.cs
- XmlAtomicValue.cs
- StringPropertyBuilder.cs
- FieldNameLookup.cs
- AdvancedBindingEditor.cs
- UdpChannelListener.cs
- GridViewRowPresenter.cs
- UnsafeNativeMethods.cs
- FocusChangedEventArgs.cs
- FixedFindEngine.cs
- PolyBezierSegmentFigureLogic.cs
- SimpleWorkerRequest.cs
- BaseCodeDomTreeGenerator.cs
- DataGridViewCellLinkedList.cs
- CreateUserErrorEventArgs.cs
- LongMinMaxAggregationOperator.cs
- BaseUriWithWildcard.cs
- IncrementalReadDecoders.cs
- EncryptedData.cs
- ReferencedAssembly.cs
- panel.cs
- CodeDelegateCreateExpression.cs
- DecoderBestFitFallback.cs
- HandleExceptionArgs.cs
- ServerProtocol.cs
- CatalogZoneBase.cs
- AccessedThroughPropertyAttribute.cs
- ValidationEventArgs.cs
- TableItemStyle.cs
- DateTimePicker.cs
- AddInControllerImpl.cs
- DockProviderWrapper.cs
- SqlCacheDependency.cs