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
- safesecurityhelperavalon.cs
- WebBrowserNavigatingEventHandler.cs
- ClientScriptManager.cs
- PersonalizationProvider.cs
- XNodeNavigator.cs
- ImageSourceConverter.cs
- SmiMetaData.cs
- ArithmeticException.cs
- PhonemeConverter.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- RuntimeConfig.cs
- DateRangeEvent.cs
- CompleteWizardStep.cs
- SafeMemoryMappedFileHandle.cs
- StyleSheetComponentEditor.cs
- EventTrigger.cs
- Variable.cs
- TraceLog.cs
- JavaScriptObjectDeserializer.cs
- WebPartMovingEventArgs.cs
- ServiceXNameTypeConverter.cs
- XmlComment.cs
- ListenerElementsCollection.cs
- SchemaMapping.cs
- SID.cs
- SynchronizationContext.cs
- HttpModuleActionCollection.cs
- DataGridViewAdvancedBorderStyle.cs
- DataPagerFieldCommandEventArgs.cs
- BuildManagerHost.cs
- DataConnectionHelper.cs
- HttpRuntimeSection.cs
- WebPartDisplayMode.cs
- XamlSerializer.cs
- CreateUserErrorEventArgs.cs
- DataObjectFieldAttribute.cs
- TagNameToTypeMapper.cs
- XamlSerializer.cs
- PageAsyncTaskManager.cs
- DataGridViewHitTestInfo.cs
- CommonDialog.cs
- CodeNamespaceImportCollection.cs
- XmlArrayItemAttribute.cs
- VerificationException.cs
- ParallelRangeManager.cs
- Logging.cs
- SoapObjectReader.cs
- PackageRelationshipSelector.cs
- ResourceAssociationSet.cs
- DisableDpiAwarenessAttribute.cs
- PenContexts.cs
- Binding.cs
- TransformerTypeCollection.cs
- DeploymentSection.cs
- BamlTreeMap.cs
- ConfigurationSectionGroup.cs
- EventProvider.cs
- WebPartConnection.cs
- DataRecord.cs
- LocalizableResourceBuilder.cs
- ComplexPropertyEntry.cs
- PageBuildProvider.cs
- LayoutInformation.cs
- UpdatePanel.cs
- RouteParameter.cs
- DiscoveryClientDocuments.cs
- LinkLabelLinkClickedEvent.cs
- mactripleDES.cs
- HtmlInputReset.cs
- WindowsRegion.cs
- Activator.cs
- IList.cs
- SystemException.cs
- HelpFileFileNameEditor.cs
- BrushConverter.cs
- ServicesUtilities.cs
- SinglePageViewer.cs
- FixedPage.cs
- CurrentChangedEventManager.cs
- SystemThemeKey.cs
- TextServicesPropertyRanges.cs
- AssemblyAssociatedContentFileAttribute.cs
- FilteredXmlReader.cs
- WithParamAction.cs
- DataError.cs
- Membership.cs
- ListViewItem.cs
- DateTimeAutomationPeer.cs
- TemplatePartAttribute.cs
- Stackframe.cs
- TypeConverterValueSerializer.cs
- BaseValidatorDesigner.cs
- DataReaderContainer.cs
- MenuItemBinding.cs
- Evidence.cs
- TreeBuilder.cs
- PriorityRange.cs
- DependencyObjectType.cs
- StreamGeometry.cs
- ToolStripRenderer.cs