Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / Diagnostics / Eventing / Reader / EventBookmark.cs / 1305376 / EventBookmark.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: EventBookmark ** ** Purpose: ** This public class represents an opaque Event Bookmark obtained ** from an EventRecord. The bookmark denotes a unique identifier ** for the event instance as well as marks the location in the ** the result set of the EventReader that the event instance was ** obtained from. ** ============================================================*/ using System.Runtime.InteropServices; using System.Security.Permissions; using System.Runtime.Serialization; namespace System.Diagnostics.Eventing.Reader { // // NOTE: This class must be generic enough to be used across // eventing base implementations. Cannot add anything // that ties it to one particular implementation. // ////// Represents an opaque Event Bookmark obtained from an EventRecord. /// The bookmark denotes a unique identifier for the event instance as /// well as marks the location in the the result set of the EventReader /// that the event instance was obtained from. /// [Serializable] [System.Security.Permissions.HostProtection(MayLeakOnAbort = true)] public class EventBookmark : ISerializable { string bookmark; internal EventBookmark(string bookmarkText) { if (bookmarkText == null) throw new ArgumentNullException("bookmarkText"); this.bookmark = bookmarkText; } protected EventBookmark(SerializationInfo info, StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); this.bookmark = info.GetString("BookmarkText"); } // SecurityCritical due to inherited link demand for GetObjectData. [System.Security.SecurityCritical,SecurityPermissionAttribute(SecurityAction.LinkDemand,Flags = SecurityPermissionFlag.SerializationFormatter)] void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) { GetObjectData( info, context ); } // SecurityCritical due to inherited link demand for GetObjectData. [System.Security.SecurityCritical,SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)] protected virtual void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); info.AddValue("BookmarkText", this.bookmark); } internal string BookmarkText { get { return bookmark; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: EventBookmark ** ** Purpose: ** This public class represents an opaque Event Bookmark obtained ** from an EventRecord. The bookmark denotes a unique identifier ** for the event instance as well as marks the location in the ** the result set of the EventReader that the event instance was ** obtained from. ** ============================================================*/ using System.Runtime.InteropServices; using System.Security.Permissions; using System.Runtime.Serialization; namespace System.Diagnostics.Eventing.Reader { // // NOTE: This class must be generic enough to be used across // eventing base implementations. Cannot add anything // that ties it to one particular implementation. // ////// Represents an opaque Event Bookmark obtained from an EventRecord. /// The bookmark denotes a unique identifier for the event instance as /// well as marks the location in the the result set of the EventReader /// that the event instance was obtained from. /// [Serializable] [System.Security.Permissions.HostProtection(MayLeakOnAbort = true)] public class EventBookmark : ISerializable { string bookmark; internal EventBookmark(string bookmarkText) { if (bookmarkText == null) throw new ArgumentNullException("bookmarkText"); this.bookmark = bookmarkText; } protected EventBookmark(SerializationInfo info, StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); this.bookmark = info.GetString("BookmarkText"); } // SecurityCritical due to inherited link demand for GetObjectData. [System.Security.SecurityCritical,SecurityPermissionAttribute(SecurityAction.LinkDemand,Flags = SecurityPermissionFlag.SerializationFormatter)] void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) { GetObjectData( info, context ); } // SecurityCritical due to inherited link demand for GetObjectData. [System.Security.SecurityCritical,SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)] protected virtual void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); info.AddValue("BookmarkText", this.bookmark); } internal string BookmarkText { get { return bookmark; } } } } // 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
- NameObjectCollectionBase.cs
- ItemCheckEvent.cs
- Logging.cs
- CapacityStreamGeometryContext.cs
- WebPartTransformerAttribute.cs
- HttpCacheVaryByContentEncodings.cs
- UnsafeNativeMethods.cs
- XmlnsDictionary.cs
- Ray3DHitTestResult.cs
- TypeSchema.cs
- SqlDataSourceConfigureSelectPanel.cs
- BlurBitmapEffect.cs
- DateTimeOffsetStorage.cs
- DomainUpDown.cs
- SafeWaitHandle.cs
- XmlParserContext.cs
- __ComObject.cs
- TextTreeNode.cs
- ConsumerConnectionPointCollection.cs
- DnsEndPoint.cs
- LinearKeyFrames.cs
- KnownTypeDataContractResolver.cs
- PolyBezierSegment.cs
- TimeSpanValidatorAttribute.cs
- ResourceDisplayNameAttribute.cs
- DateTimeStorage.cs
- EntityCommand.cs
- LocationInfo.cs
- Domain.cs
- TableStyle.cs
- BuildProviderAppliesToAttribute.cs
- PointAnimation.cs
- XmlExtensionFunction.cs
- ScriptControl.cs
- ComboBox.cs
- HealthMonitoringSection.cs
- AdapterUtil.cs
- ISessionStateStore.cs
- MergeLocalizationDirectives.cs
- IPGlobalProperties.cs
- MaxMessageSizeStream.cs
- _UncName.cs
- UIHelper.cs
- MessageQueueInstaller.cs
- DCSafeHandle.cs
- PrimitiveSchema.cs
- ScrollBar.cs
- DynamicValueConverter.cs
- ArrayElementGridEntry.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- CharEntityEncoderFallback.cs
- MenuItemBindingCollection.cs
- Focus.cs
- HtmlUtf8RawTextWriter.cs
- TabControlAutomationPeer.cs
- GridItem.cs
- TagMapInfo.cs
- Visitor.cs
- HashSetEqualityComparer.cs
- WorkflowMarkupSerializerMapping.cs
- CacheEntry.cs
- HttpApplication.cs
- SmiEventSink_Default.cs
- TableItemPattern.cs
- ListView.cs
- SuppressIldasmAttribute.cs
- AncestorChangedEventArgs.cs
- FlowPosition.cs
- Bookmark.cs
- FormViewDeleteEventArgs.cs
- SoapEnumAttribute.cs
- ContentIterators.cs
- StylusDownEventArgs.cs
- RoleManagerModule.cs
- relpropertyhelper.cs
- CheckoutException.cs
- RowBinding.cs
- RayHitTestParameters.cs
- SafeEventLogWriteHandle.cs
- OptimizedTemplateContent.cs
- StorageBasedPackageProperties.cs
- WebPartsSection.cs
- XappLauncher.cs
- HeaderCollection.cs
- TouchFrameEventArgs.cs
- SingleSelectRootGridEntry.cs
- Schedule.cs
- RelationshipNavigation.cs
- MessageDecoder.cs
- Baml2006ReaderContext.cs
- QuadraticBezierSegment.cs
- SubclassTypeValidatorAttribute.cs
- BooleanToVisibilityConverter.cs
- StringWriter.cs
- SplitContainer.cs
- FormsIdentity.cs
- ImportedPolicyConversionContext.cs
- RSAProtectedConfigurationProvider.cs
- HttpCachePolicyBase.cs
- DataGridViewLayoutData.cs