Code:
/ 4.0 / 4.0 / 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. //------------------------------------------------------------------------------ //// 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
- NetTcpSection.cs
- DataGridViewButtonColumn.cs
- ValidationPropertyAttribute.cs
- CodeAttributeArgumentCollection.cs
- TreeChangeInfo.cs
- SqlParameterCollection.cs
- Double.cs
- _Events.cs
- _FtpDataStream.cs
- SqlError.cs
- hresults.cs
- DataErrorValidationRule.cs
- ProcessRequestAsyncResult.cs
- PrintDocument.cs
- EntityKey.cs
- RuleSetReference.cs
- CharEntityEncoderFallback.cs
- SystemIPGlobalProperties.cs
- SqlBooleanMismatchVisitor.cs
- Int16AnimationBase.cs
- UInt32.cs
- GPPOINT.cs
- CompilationRelaxations.cs
- BindingList.cs
- ListSortDescription.cs
- UserControl.cs
- PersistChildrenAttribute.cs
- PseudoWebRequest.cs
- Helpers.cs
- NominalTypeEliminator.cs
- BitmapCodecInfo.cs
- SqlUtils.cs
- References.cs
- ViewKeyConstraint.cs
- JavaScriptString.cs
- SecurityKeyType.cs
- ParserExtension.cs
- LinqDataSourceDeleteEventArgs.cs
- ElapsedEventArgs.cs
- BitVec.cs
- ChainedAsyncResult.cs
- OleDbConnectionInternal.cs
- SqlConnectionHelper.cs
- CodeAttributeDeclarationCollection.cs
- CharConverter.cs
- SoapSchemaMember.cs
- OdbcHandle.cs
- ThreadWorkerController.cs
- CaseInsensitiveOrdinalStringComparer.cs
- PreDigestedSignedInfo.cs
- SchemaTableColumn.cs
- figurelengthconverter.cs
- DbProviderFactoriesConfigurationHandler.cs
- ParamArrayAttribute.cs
- FileAuthorizationModule.cs
- XmlComment.cs
- NotificationContext.cs
- _BufferOffsetSize.cs
- RadialGradientBrush.cs
- AppDomainEvidenceFactory.cs
- Graphics.cs
- TraceUtility.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- HandlerFactoryCache.cs
- BamlMapTable.cs
- WriteableBitmap.cs
- XmlSchemaSimpleContentRestriction.cs
- SubordinateTransaction.cs
- PersonalizationState.cs
- SqlCommandSet.cs
- UidManager.cs
- BrowserCapabilitiesFactoryBase.cs
- ContextStack.cs
- HGlobalSafeHandle.cs
- DynamicQueryableWrapper.cs
- CategoryNameCollection.cs
- OdbcRowUpdatingEvent.cs
- Wizard.cs
- CodeNamespaceImport.cs
- MethodBuilder.cs
- XmlReaderDelegator.cs
- HttpCookiesSection.cs
- DataGridViewTextBoxCell.cs
- OrderingInfo.cs
- ChtmlTextWriter.cs
- TypeElementCollection.cs
- ReservationCollection.cs
- RepeatBehavior.cs
- InitializerFacet.cs
- XmlObjectSerializerWriteContextComplex.cs
- RangeBase.cs
- Char.cs
- SafeBitVector32.cs
- PathFigureCollection.cs
- GridViewSortEventArgs.cs
- HttpListenerContext.cs
- PropertyReferenceSerializer.cs
- GeometryHitTestParameters.cs
- PropertyPanel.cs
- FontFamilyIdentifier.cs