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
- SemanticResultValue.cs
- CurrencyManager.cs
- DynamicPropertyReader.cs
- ManagementScope.cs
- RolePrincipal.cs
- ColumnBinding.cs
- ItemMap.cs
- MatrixTransform.cs
- ImportException.cs
- PerformanceCounterLib.cs
- ListDependantCardsRequest.cs
- FieldMetadata.cs
- SQLBinaryStorage.cs
- SingleResultAttribute.cs
- MasterPage.cs
- XmlDesignerDataSourceView.cs
- TransformValueSerializer.cs
- OutputScope.cs
- IndicCharClassifier.cs
- XmlSchemaException.cs
- DefaultHttpHandler.cs
- assertwrapper.cs
- WebPartDescriptionCollection.cs
- COM2IProvidePropertyBuilderHandler.cs
- MatrixCamera.cs
- WindowsEditBox.cs
- XmlSchemaSimpleContent.cs
- Compilation.cs
- DataBoundControlDesigner.cs
- ItemTypeToolStripMenuItem.cs
- CodeSnippetExpression.cs
- MimeXmlImporter.cs
- ListItem.cs
- HistoryEventArgs.cs
- SafeBitVector32.cs
- DetailsViewActionList.cs
- UIntPtr.cs
- EventHandlerList.cs
- MultiplexingDispatchMessageFormatter.cs
- GlyphRun.cs
- HttpApplicationStateBase.cs
- SqlDesignerDataSourceView.cs
- ParserExtension.cs
- TextProviderWrapper.cs
- AvTraceFormat.cs
- ExternalCalls.cs
- SymbolResolver.cs
- IItemContainerGenerator.cs
- AtlasWeb.Designer.cs
- SchemaLookupTable.cs
- _MultipleConnectAsync.cs
- InputBuffer.cs
- ScaleTransform3D.cs
- ViewGenResults.cs
- ColorConvertedBitmap.cs
- SplitterCancelEvent.cs
- RelationshipManager.cs
- PeerPresenceInfo.cs
- BaseProcessor.cs
- TextEndOfLine.cs
- CompilationUtil.cs
- SimpleRecyclingCache.cs
- PrePrepareMethodAttribute.cs
- UndoEngine.cs
- ExpressionPrefixAttribute.cs
- ProxyHelper.cs
- BitHelper.cs
- SqlColumnizer.cs
- Soap12ProtocolReflector.cs
- MasterPage.cs
- FastEncoderWindow.cs
- UserPreferenceChangedEventArgs.cs
- DataRowCollection.cs
- WorkflowInlining.cs
- GeneralTransform3DGroup.cs
- WebScriptEndpoint.cs
- SoapReflectionImporter.cs
- ScrollViewer.cs
- EdmConstants.cs
- OleDbDataReader.cs
- DetailsViewInsertedEventArgs.cs
- SourceSwitch.cs
- CompilerLocalReference.cs
- TemplateControl.cs
- FixedHighlight.cs
- sqlinternaltransaction.cs
- GridView.cs
- LocatorPart.cs
- DesignerDataSourceView.cs
- Model3D.cs
- ByteAnimationBase.cs
- Figure.cs
- Hash.cs
- UIElement3D.cs
- FormsIdentity.cs
- TdsParserSessionPool.cs
- StorageMappingItemCollection.cs
- ToolBar.cs
- Graph.cs
- SecurityResources.cs