Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / Diagnostics / Eventing / EventDescriptor.cs / 1305376 / EventDescriptor.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.Runtime.InteropServices; using System.Diagnostics.CodeAnalysis; namespace System.Diagnostics.Eventing { [StructLayout(LayoutKind.Explicit, Size = 16)] [System.Security.Permissions.HostProtection(MayLeakOnAbort = true)] public struct EventDescriptor { [FieldOffset(0)] private ushort m_id; [FieldOffset(2)] private byte m_version; [FieldOffset(3)] private byte m_channel; [FieldOffset(4)] private byte m_level; [FieldOffset(5)] private byte m_opcode; [FieldOffset(6)] private ushort m_task; [FieldOffset(8)] private long m_keywords; [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "opcode", Justification = "[....]: Shipped public in 3.5, breaking change to fix now.")] public EventDescriptor( int id, byte version, byte channel, byte level, byte opcode, int task, long keywords ) { if (id < 0) { throw new ArgumentOutOfRangeException("id", SR.GetString(SR.ArgumentOutOfRange_NeedNonNegNum)); } if (id > ushort.MaxValue) { throw new ArgumentOutOfRangeException("id", SR.GetString(SR.ArgumentOutOfRange_NeedValidId, 1, ushort.MaxValue)); } m_id = (ushort)id; m_version = version; m_channel = channel; m_level = level; m_opcode = opcode; m_keywords = keywords; if (task < 0) { throw new ArgumentOutOfRangeException("task", SR.GetString(SR.ArgumentOutOfRange_NeedNonNegNum)); } if (task > ushort.MaxValue) { throw new ArgumentOutOfRangeException("task", SR.GetString(SR.ArgumentOutOfRange_NeedValidId, 1, ushort.MaxValue)); } m_task = (ushort)task; } public int EventId { get { return m_id; } } public byte Version { get { return m_version; } } public byte Channel { get { return m_channel; } } public byte Level { get { return m_level; } } [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "Opcode", Justification = "[....]: Shipped public in 3.5, breaking change to fix now.")] public byte Opcode { get { return m_opcode; } } public int Task { get { return m_task; } } public long Keywords { get { return m_keywords; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AppDomainGrammarProxy.cs
- DataGridViewButtonCell.cs
- SqlReferenceCollection.cs
- TextTreeUndo.cs
- UnmanagedHandle.cs
- CodeThrowExceptionStatement.cs
- XMLSyntaxException.cs
- DesignerTransaction.cs
- SafeBitVector32.cs
- ADRoleFactory.cs
- ConfigurationSchemaErrors.cs
- StylusPlugin.cs
- MiniModule.cs
- DatatypeImplementation.cs
- ClientApiGenerator.cs
- InvalidCommandTreeException.cs
- AssemblyFilter.cs
- TdsParameterSetter.cs
- ScrollBarRenderer.cs
- VariableAction.cs
- SID.cs
- TaiwanCalendar.cs
- ControlUtil.cs
- ValidationErrorInfo.cs
- ToolboxComponentsCreatingEventArgs.cs
- VerticalAlignConverter.cs
- DetailsViewDeletedEventArgs.cs
- SqlError.cs
- CommandLibraryHelper.cs
- PersonalizationState.cs
- ServiceModelConfigurationSection.cs
- DesignOnlyAttribute.cs
- XmlSchemaObject.cs
- SmtpTransport.cs
- ToolTipService.cs
- XmlSchemaSimpleTypeRestriction.cs
- BaseHashHelper.cs
- OdbcParameterCollection.cs
- PopOutPanel.cs
- WhileDesigner.cs
- Policy.cs
- ResizeGrip.cs
- LayoutInformation.cs
- Environment.cs
- HostSecurityManager.cs
- DataComponentNameHandler.cs
- ChtmlFormAdapter.cs
- QueryCacheEntry.cs
- ServiceAuthorizationElement.cs
- Attributes.cs
- DataRow.cs
- TextFormattingConverter.cs
- URI.cs
- WindowsRichEdit.cs
- IndexerNameAttribute.cs
- TaskSchedulerException.cs
- QilDataSource.cs
- FixedSOMTableRow.cs
- PowerStatus.cs
- ListBoxItem.cs
- CaseInsensitiveHashCodeProvider.cs
- ExponentialEase.cs
- PersistenceProviderFactory.cs
- DataViewListener.cs
- TemplateNameScope.cs
- DataGridTextBox.cs
- WorkflowViewElement.cs
- DataTableClearEvent.cs
- linebase.cs
- TypeLoadException.cs
- PasswordRecoveryDesigner.cs
- PolicyException.cs
- MenuItemStyle.cs
- XpsSerializerWriter.cs
- Typeface.cs
- columnmapfactory.cs
- XpsFontSubsetter.cs
- ProtocolElementCollection.cs
- ReturnType.cs
- GacUtil.cs
- DbConnectionClosed.cs
- CompilerGeneratedAttribute.cs
- SerTrace.cs
- ValidatorCollection.cs
- BaseUriHelper.cs
- FontUnit.cs
- Point4DConverter.cs
- SessionStateContainer.cs
- SecureStringHasher.cs
- SmtpFailedRecipientsException.cs
- ExpressionBinding.cs
- invalidudtexception.cs
- DirectionalLight.cs
- VirtualizedItemProviderWrapper.cs
- AccessDataSourceView.cs
- Simplifier.cs
- BasicHttpSecurity.cs
- SqlTrackingQuery.cs
- ReferenceEqualityComparer.cs
- AutomationEvent.cs