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
- TextBreakpoint.cs
- AsmxEndpointPickerExtension.cs
- HtmlTernaryTree.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- BaseDataList.cs
- Transform3DGroup.cs
- TextServicesLoader.cs
- FlowDocumentPaginator.cs
- X509Certificate.cs
- ButtonAutomationPeer.cs
- TimeSpan.cs
- PerformanceCounter.cs
- CompiledQuery.cs
- NotCondition.cs
- DataTableTypeConverter.cs
- ApplicationServiceHelper.cs
- CharConverter.cs
- XmlIncludeAttribute.cs
- PolyLineSegment.cs
- ADMembershipUser.cs
- X509AudioLogo.cs
- httpstaticobjectscollection.cs
- RelationshipFixer.cs
- DataColumnMappingCollection.cs
- IisTraceWebEventProvider.cs
- ResourceReferenceExpression.cs
- TimeSpanStorage.cs
- Events.cs
- Evidence.cs
- Boolean.cs
- TdsParser.cs
- Debug.cs
- Stacktrace.cs
- CryptoApi.cs
- PageThemeBuildProvider.cs
- PropertyValueEditor.cs
- CustomWebEventKey.cs
- IPEndPoint.cs
- Gdiplus.cs
- RoleManagerEventArgs.cs
- DesignTimeParseData.cs
- SqlTrackingService.cs
- EntityViewContainer.cs
- EdmToObjectNamespaceMap.cs
- GridViewRowEventArgs.cs
- RouteParameter.cs
- ProxyFragment.cs
- DecodeHelper.cs
- TextSelectionHighlightLayer.cs
- NotifyCollectionChangedEventArgs.cs
- DSASignatureFormatter.cs
- SqlWorkflowPersistenceService.cs
- RelationshipEndMember.cs
- Border.cs
- sqlstateclientmanager.cs
- Enum.cs
- WebHeaderCollection.cs
- QuadraticBezierSegment.cs
- QueryContinueDragEventArgs.cs
- UnaryNode.cs
- ZipFileInfoCollection.cs
- SqlServer2KCompatibilityAnnotation.cs
- GridItemProviderWrapper.cs
- ProcessInfo.cs
- PreProcessor.cs
- ModelVisual3D.cs
- WizardStepBase.cs
- XamlRtfConverter.cs
- SpecialNameAttribute.cs
- WrapPanel.cs
- TimeManager.cs
- EditBehavior.cs
- RotateTransform3D.cs
- MatchingStyle.cs
- UnSafeCharBuffer.cs
- UInt32Storage.cs
- SqlConnectionManager.cs
- UrlPath.cs
- VectorKeyFrameCollection.cs
- SqlMethodAttribute.cs
- UnmanagedBitmapWrapper.cs
- InputLanguageManager.cs
- CompositeClientFormatter.cs
- XpsPartBase.cs
- HostedElements.cs
- XPathNodeList.cs
- ConnectionInterfaceCollection.cs
- GlyphRunDrawing.cs
- OutputScopeManager.cs
- Contracts.cs
- remotingproxy.cs
- LicenseException.cs
- RemoteHelper.cs
- TrackingStringDictionary.cs
- TextDpi.cs
- XmlLoader.cs
- StringAttributeCollection.cs
- ChannelEndpointElement.cs
- ContentFilePart.cs
- DefaultAssemblyResolver.cs