Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / Diagnostics / Eventing / Reader / EventLogQuery.cs / 1305376 / EventLogQuery.cs
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** Class: EventLogQuery
**
** Purpose:
** This public class allows a user to define events of interest.
** An instance of this class is passed to an EventReader to actually
** obtain the EventRecords. The EventLogQuery can be as
** simple specifying that all events are of interest, or it can contain
** query / xpath expressions that indicate exactly what characteristics
** events should have.
**
============================================================*/
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
namespace System.Diagnostics.Eventing.Reader {
///
/// Allows a user to define events of interest. An instance of this
/// class is passed to an EventReader to actually obtain the EventRecords.
/// The EventLogQuery can be as simple specifying that all events are of
/// interest, or it can contain query / xpath expressions that indicate exactly
/// what characteristics events should have.
///
public class EventLogQuery {
private string query;
private string path;
private EventLogSession session;
private PathType pathType;
private bool tolerateErrors = false;
private bool reverseDirection = false;
public EventLogQuery(string path, PathType pathType)
: this(path, pathType, null) {
}
public EventLogQuery(string path, PathType pathType, string query) {
this.session = EventLogSession.GlobalSession;
this.path = path; // can be null
this.pathType = pathType;
if (query == null) {
if (path == null)
throw new ArgumentNullException("path");
}
else {
this.query = query;
}
}
public EventLogSession Session {
get {
return this.session;
}
set {
this.session = value;
}
}
public bool TolerateQueryErrors {
get {
return this.tolerateErrors;
}
set {
this.tolerateErrors = value;
}
}
public bool ReverseDirection {
get {
return this.reverseDirection;
}
set {
this.reverseDirection = value;
}
}
internal string Path {
get {
return this.path;
}
}
internal PathType ThePathType {
get {
return this.pathType;
}
}
internal string Query {
get {
return this.query;
}
}
}
}
// 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
- BinaryMethodMessage.cs
- SecurityTokenReferenceStyle.cs
- UniqueEventHelper.cs
- IndicShape.cs
- ConfigXmlCDataSection.cs
- XmlnsCompatibleWithAttribute.cs
- ColorContextHelper.cs
- WorkflowRuntime.cs
- IdnMapping.cs
- ToolStripDropDownDesigner.cs
- _AuthenticationState.cs
- wgx_exports.cs
- DataGridBeginningEditEventArgs.cs
- DataContractSerializerElement.cs
- AdRotator.cs
- TypedDatasetGenerator.cs
- DeferredSelectedIndexReference.cs
- SplineKeyFrames.cs
- GeneralTransformGroup.cs
- HttpCacheVary.cs
- QueryableFilterUserControl.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- RoleServiceManager.cs
- PropertyMap.cs
- ConditionalAttribute.cs
- ButtonRenderer.cs
- XmlImplementation.cs
- StrongNameUtility.cs
- Int32Rect.cs
- UIElementParagraph.cs
- UserControlBuildProvider.cs
- OpCodes.cs
- DynamicDiscoSearcher.cs
- OleDbInfoMessageEvent.cs
- Brushes.cs
- XmlSchemaSimpleType.cs
- SystemIPInterfaceProperties.cs
- URI.cs
- BmpBitmapEncoder.cs
- RegistryPermission.cs
- JsonWriter.cs
- BindingMAnagerBase.cs
- Point3DConverter.cs
- VisualStyleRenderer.cs
- Span.cs
- _ConnectStream.cs
- IntSecurity.cs
- VectorAnimationUsingKeyFrames.cs
- SemanticResultValue.cs
- Win32.cs
- DeploymentSection.cs
- NumberSubstitution.cs
- StringArrayConverter.cs
- ReadOnlyCollectionBuilder.cs
- Keywords.cs
- Geometry3D.cs
- Avt.cs
- future.cs
- WindowInteractionStateTracker.cs
- TypedDatasetGenerator.cs
- CorrelationKeyCalculator.cs
- IdnElement.cs
- SqlDependencyListener.cs
- MessageTransmitTraceRecord.cs
- MetadataItem.cs
- GeneralTransform.cs
- XPathArrayIterator.cs
- ReferenceService.cs
- TransformerInfo.cs
- BitmapCacheBrush.cs
- ParsedAttributeCollection.cs
- Component.cs
- QilValidationVisitor.cs
- PathNode.cs
- SecurityResources.cs
- TableLayoutSettingsTypeConverter.cs
- ControlPropertyNameConverter.cs
- BinaryMethodMessage.cs
- WorkflowLayouts.cs
- EntityViewContainer.cs
- QueryReaderSettings.cs
- DbProviderSpecificTypePropertyAttribute.cs
- CodeSubDirectory.cs
- AssemblyBuilder.cs
- FixedTextView.cs
- DataGridViewSelectedRowCollection.cs
- StringTraceRecord.cs
- PersistencePipeline.cs
- QueryResponse.cs
- RegistrationProxy.cs
- WebPartTransformerCollection.cs
- X509CertificateCollection.cs
- AttachmentCollection.cs
- DocumentEventArgs.cs
- ScrollData.cs
- CheckBoxStandardAdapter.cs
- Globals.cs
- DoubleLinkList.cs
- EnumValidator.cs
- WebBrowser.cs