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
- HttpCachePolicyElement.cs
- HandleRef.cs
- EventArgs.cs
- ToolStripGripRenderEventArgs.cs
- BaseConfigurationRecord.cs
- EmptyQuery.cs
- Messages.cs
- FileVersionInfo.cs
- OleDbStruct.cs
- PersistenceTypeAttribute.cs
- MiniMapControl.xaml.cs
- QueryConverter.cs
- TagNameToTypeMapper.cs
- ThreadExceptionDialog.cs
- XmlUtf8RawTextWriter.cs
- ZipPackage.cs
- UInt32Converter.cs
- ParameterElementCollection.cs
- ConnectionStringsExpressionBuilder.cs
- Panel.cs
- PreservationFileReader.cs
- HtmlShim.cs
- _SpnDictionary.cs
- ApplyImportsAction.cs
- OleDbReferenceCollection.cs
- DES.cs
- TableLayoutPanelCodeDomSerializer.cs
- KeyNotFoundException.cs
- WebContext.cs
- StreamInfo.cs
- DeploymentSection.cs
- DeleteCardRequest.cs
- ControlBuilderAttribute.cs
- TextBox.cs
- HtmlTable.cs
- DescendantOverDescendantQuery.cs
- ToolStripProgressBar.cs
- HttpWebRequestElement.cs
- ProfileParameter.cs
- ReadWriteControlDesigner.cs
- RubberbandSelector.cs
- IPAddressCollection.cs
- _Events.cs
- Padding.cs
- Int16Storage.cs
- AstTree.cs
- ChildChangedEventArgs.cs
- WebPartEditorCancelVerb.cs
- UmAlQuraCalendar.cs
- SchemaType.cs
- Pkcs7Recipient.cs
- DataSourceXmlSerializer.cs
- LambdaCompiler.Logical.cs
- CodeCatchClauseCollection.cs
- PassportAuthenticationModule.cs
- VerificationAttribute.cs
- AdPostCacheSubstitution.cs
- SmiEventSink_Default.cs
- MethodToken.cs
- RoleManagerModule.cs
- X509DefaultServiceCertificateElement.cs
- BaseAsyncResult.cs
- DataObjectMethodAttribute.cs
- FixedSOMGroup.cs
- AssemblyFilter.cs
- UpnEndpointIdentity.cs
- ParenExpr.cs
- UnaryNode.cs
- XmlQualifiedNameTest.cs
- RequiredFieldValidator.cs
- RootBuilder.cs
- FocusManager.cs
- StateDesigner.TransitionInfo.cs
- EventMappingSettings.cs
- CorrelationToken.cs
- RemotingServices.cs
- HtmlInputReset.cs
- ScriptServiceAttribute.cs
- StorageTypeMapping.cs
- GroupAggregateExpr.cs
- AppDomainProtocolHandler.cs
- _emptywebproxy.cs
- DecoderExceptionFallback.cs
- ResourcesBuildProvider.cs
- BrowserCapabilitiesFactory.cs
- webeventbuffer.cs
- LinearKeyFrames.cs
- InlineObject.cs
- MemberInfoSerializationHolder.cs
- ActiveXContainer.cs
- HotSpot.cs
- SafeMILHandle.cs
- ClusterRegistryConfigurationProvider.cs
- Quaternion.cs
- DESCryptoServiceProvider.cs
- ValidatedControlConverter.cs
- UnconditionalPolicy.cs
- ForwardPositionQuery.cs
- HtmlElementErrorEventArgs.cs
- WpfPayload.cs