Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- DocumentSequenceHighlightLayer.cs
- ElementsClipboardData.cs
- GeometryModel3D.cs
- LogArchiveSnapshot.cs
- GestureRecognizer.cs
- MessageQueuePermission.cs
- PartialCachingControl.cs
- SafeFileMappingHandle.cs
- HttpListenerResponse.cs
- XmlSequenceWriter.cs
- bidPrivateBase.cs
- XmlRawWriterWrapper.cs
- NameSpaceEvent.cs
- RadioButtonRenderer.cs
- DictionaryCustomTypeDescriptor.cs
- Debug.cs
- SchemaSetCompiler.cs
- OrderedDictionary.cs
- UpdatePanelTriggerCollection.cs
- PropertyItem.cs
- CurrentChangingEventArgs.cs
- DbConnectionPool.cs
- BitmapEffectGeneralTransform.cs
- XhtmlCssHandler.cs
- SqlSelectStatement.cs
- AccessDataSource.cs
- HttpRawResponse.cs
- XmlNamedNodeMap.cs
- DNS.cs
- ListControlDesigner.cs
- InvalidOleVariantTypeException.cs
- SwitchElementsCollection.cs
- MouseEventArgs.cs
- StatusBarPanel.cs
- WebSysDefaultValueAttribute.cs
- QilFactory.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- NameTable.cs
- TextDpi.cs
- BulletChrome.cs
- HostSecurityManager.cs
- XXXInfos.cs
- Rect3D.cs
- SimpleRecyclingCache.cs
- MethodExecutor.cs
- TextServicesHost.cs
- WebConfigurationManager.cs
- ExpandableObjectConverter.cs
- DeviceSpecificDialogCachedState.cs
- LambdaCompiler.Generated.cs
- ModuleElement.cs
- Pkcs7Recipient.cs
- ResourcePool.cs
- WebSysDefaultValueAttribute.cs
- ContainerParaClient.cs
- MouseActionValueSerializer.cs
- ExpandCollapsePattern.cs
- FormCollection.cs
- TypedReference.cs
- TimeoutException.cs
- PointUtil.cs
- SharedConnectionListener.cs
- CodeTypeMember.cs
- IdentityNotMappedException.cs
- LoadGrammarCompletedEventArgs.cs
- SoapElementAttribute.cs
- BinaryObjectWriter.cs
- ErrorInfoXmlDocument.cs
- KnownIds.cs
- Timeline.cs
- NavigationHelper.cs
- DBConcurrencyException.cs
- TcpHostedTransportConfiguration.cs
- WindowsListViewGroupSubsetLink.cs
- MetadataItem_Static.cs
- BasicBrowserDialog.cs
- XmlComment.cs
- documentsequencetextpointer.cs
- VisualTreeUtils.cs
- DocumentViewerBase.cs
- KerberosSecurityTokenAuthenticator.cs
- SiteMapPath.cs
- XmlSchemaFacet.cs
- StrongNamePublicKeyBlob.cs
- CodeSubDirectoriesCollection.cs
- MasterPageBuildProvider.cs
- SqlCacheDependencySection.cs
- RawMouseInputReport.cs
- TargetFrameworkAttribute.cs
- OptionalColumn.cs
- AssertUtility.cs
- ConnectionManagementElement.cs
- AdvancedBindingEditor.cs
- SecurityDocument.cs
- NoneExcludedImageIndexConverter.cs
- ButtonField.cs
- Converter.cs
- CompareInfo.cs
- DrawingDrawingContext.cs
- CodeIterationStatement.cs