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
- CodeFieldReferenceExpression.cs
- DesignerSerializerAttribute.cs
- DataGridItemEventArgs.cs
- XhtmlBasicLabelAdapter.cs
- ConsumerConnectionPoint.cs
- Run.cs
- WebServiceHandlerFactory.cs
- SelectionPattern.cs
- RegularExpressionValidator.cs
- VisualCollection.cs
- MimeMultiPart.cs
- Guid.cs
- XsdBuilder.cs
- MenuEventArgs.cs
- EntityCommandExecutionException.cs
- EventEntry.cs
- PenCursorManager.cs
- TreeBuilderBamlTranslator.cs
- ZeroOpNode.cs
- EntityDataSourceDesigner.cs
- DecoratedNameAttribute.cs
- TraceRecord.cs
- ConstructorExpr.cs
- TextElementEnumerator.cs
- UnsafeNativeMethods.cs
- PersistenceTypeAttribute.cs
- XmlSchemaSubstitutionGroup.cs
- EventLogPropertySelector.cs
- ScriptManagerProxy.cs
- TreeViewItemAutomationPeer.cs
- DataListItemEventArgs.cs
- XamlParser.cs
- System.Data_BID.cs
- ScriptModule.cs
- HtmlInputSubmit.cs
- RelationshipConstraintValidator.cs
- RadioButtonRenderer.cs
- PropertyValue.cs
- TriggerActionCollection.cs
- BrowsableAttribute.cs
- ProgressBar.cs
- UnmanagedMemoryStream.cs
- ZoomPercentageConverter.cs
- OutputScopeManager.cs
- CalloutQueueItem.cs
- MessageDescriptionCollection.cs
- MatrixTransform3D.cs
- RubberbandSelector.cs
- ExpandableObjectConverter.cs
- QueryTaskGroupState.cs
- ObjectDataSourceFilteringEventArgs.cs
- SQlBooleanStorage.cs
- BridgeDataReader.cs
- HtmlContainerControl.cs
- TraceXPathNavigator.cs
- WebAdminConfigurationHelper.cs
- InternalPermissions.cs
- TableLayoutPanel.cs
- XmlReader.cs
- SymbolDocumentGenerator.cs
- ACL.cs
- TraceUtility.cs
- UpdateExpressionVisitor.cs
- FileController.cs
- CollectionChangeEventArgs.cs
- ObjectPersistData.cs
- FloaterParagraph.cs
- DocumentPageViewAutomationPeer.cs
- MatrixTransform3D.cs
- GeneralTransform3DGroup.cs
- Int16Storage.cs
- XmlAttribute.cs
- BinaryObjectWriter.cs
- SessionEndingCancelEventArgs.cs
- ErrorWebPart.cs
- ParagraphResult.cs
- ValidationPropertyAttribute.cs
- CookielessData.cs
- baseaxisquery.cs
- DirectionalLight.cs
- WindowsStatusBar.cs
- elementinformation.cs
- ClonableStack.cs
- RemotingConfigParser.cs
- AnnouncementDispatcherAsyncResult.cs
- DeriveBytes.cs
- ToolboxBitmapAttribute.cs
- Constant.cs
- CompiledELinqQueryState.cs
- IntranetCredentialPolicy.cs
- ArrayEditor.cs
- KeyPressEvent.cs
- TextParagraphProperties.cs
- StreamingContext.cs
- ColumnCollection.cs
- MetadataItem_Static.cs
- SerialReceived.cs
- hresults.cs
- DataServiceBuildProvider.cs
- NameSpaceExtractor.cs