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
- AsymmetricSignatureDeformatter.cs
- figurelengthconverter.cs
- OpCodes.cs
- MatrixCamera.cs
- StaticFileHandler.cs
- DataGridViewTopRowAccessibleObject.cs
- ProfileManager.cs
- ReversePositionQuery.cs
- ErrorFormatter.cs
- AccessibilityApplicationManager.cs
- ExpressionsCollectionConverter.cs
- OracleCommandBuilder.cs
- IISMapPath.cs
- PartEditor.cs
- TimeSpanSecondsConverter.cs
- ProcessHostFactoryHelper.cs
- TypedReference.cs
- EdmTypeAttribute.cs
- OleStrCAMarshaler.cs
- ExceptionUtil.cs
- CalendarDateChangedEventArgs.cs
- ImageInfo.cs
- VoiceObjectToken.cs
- StringKeyFrameCollection.cs
- NetworkCredential.cs
- XmlSchemaAnnotation.cs
- TrustLevel.cs
- System.Data.OracleClient_BID.cs
- DynamicPhysicalDiscoSearcher.cs
- Stylus.cs
- Synchronization.cs
- LinkLabel.cs
- ReflectionTypeLoadException.cs
- BrowserDefinitionCollection.cs
- Attributes.cs
- ButtonBase.cs
- EnglishPluralizationService.cs
- ActiveXHost.cs
- MDIControlStrip.cs
- GeometryModel3D.cs
- TextBounds.cs
- RenderData.cs
- Table.cs
- GenericIdentity.cs
- ClientBuildManagerTypeDescriptionProviderBridge.cs
- NameTable.cs
- DefaultProxySection.cs
- CultureInfoConverter.cs
- CodeGeneratorOptions.cs
- StreamGeometry.cs
- Binding.cs
- FileRecordSequenceCompletedAsyncResult.cs
- QilFactory.cs
- HwndHost.cs
- IgnoreSection.cs
- DataGridItem.cs
- ProvideValueServiceProvider.cs
- BooleanSwitch.cs
- Component.cs
- BypassElementCollection.cs
- thaishape.cs
- WindowsUserNameCachingSecurityTokenAuthenticator.cs
- ValidationErrorEventArgs.cs
- TreeNode.cs
- DataObject.cs
- MatrixAnimationUsingKeyFrames.cs
- ReferencedType.cs
- ErrorCodes.cs
- ComplexLine.cs
- SqlHelper.cs
- SoapAttributes.cs
- Aggregates.cs
- KnownTypes.cs
- PageCache.cs
- Walker.cs
- DataRow.cs
- RootDesignerSerializerAttribute.cs
- WindowsEditBox.cs
- DerivedKeySecurityToken.cs
- StrongNameUtility.cs
- MethodBody.cs
- XmlNamespaceManager.cs
- ResourceContainer.cs
- RankException.cs
- EventDrivenDesigner.cs
- PeerTransportSecuritySettings.cs
- CookielessHelper.cs
- ByteRangeDownloader.cs
- WebBrowserBase.cs
- CompilationUtil.cs
- ECDsa.cs
- HostSecurityManager.cs
- BitmapEffectGroup.cs
- PermissionSetEnumerator.cs
- JsonServiceDocumentSerializer.cs
- FilterableAttribute.cs
- ByteAnimationBase.cs
- UnsafeNativeMethodsMilCoreApi.cs
- KeyEvent.cs
- NativeMethods.cs