Code:
/ 4.0 / 4.0 / 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.
// ==++==
//
// 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
- ConstraintStruct.cs
- DBNull.cs
- VScrollBar.cs
- SubtreeProcessor.cs
- ProcessStartInfo.cs
- _ChunkParse.cs
- PageThemeBuildProvider.cs
- MenuItem.cs
- TreeNodeCollection.cs
- QuestionEventArgs.cs
- PartBasedPackageProperties.cs
- QilTargetType.cs
- SubMenuStyleCollection.cs
- GeometryHitTestResult.cs
- Size.cs
- DescendantOverDescendantQuery.cs
- DtdParser.cs
- DataRowChangeEvent.cs
- GroupByExpressionRewriter.cs
- FlowDocumentReaderAutomationPeer.cs
- QuadraticBezierSegment.cs
- TextProperties.cs
- NameValuePair.cs
- StringBuilder.cs
- BindingNavigator.cs
- HttpDebugHandler.cs
- SchemaCollectionPreprocessor.cs
- NamespaceInfo.cs
- FontUnitConverter.cs
- KeysConverter.cs
- MLangCodePageEncoding.cs
- ReadOnlyDictionary.cs
- TypeResolver.cs
- ResourceKey.cs
- Misc.cs
- ViewDesigner.cs
- EventlogProvider.cs
- WebPartZoneBaseDesigner.cs
- PriorityChain.cs
- ELinqQueryState.cs
- XmlSignificantWhitespace.cs
- SizeConverter.cs
- DiffuseMaterial.cs
- HttpStaticObjectsCollectionBase.cs
- XpsSerializationManagerAsync.cs
- FrameworkElement.cs
- BulletedListEventArgs.cs
- SafePEFileHandle.cs
- DeleteHelper.cs
- SizeValueSerializer.cs
- GroupLabel.cs
- FieldBuilder.cs
- DataGridViewColumnCollectionDialog.cs
- XsltQilFactory.cs
- PartitionedStreamMerger.cs
- URLString.cs
- TiffBitmapDecoder.cs
- unitconverter.cs
- ClientCultureInfo.cs
- ColumnMapVisitor.cs
- ImageMap.cs
- WebPartCatalogAddVerb.cs
- ObjectViewEntityCollectionData.cs
- HuffCodec.cs
- RoutedEventHandlerInfo.cs
- LinqDataSourceDisposeEventArgs.cs
- VirtualDirectoryMapping.cs
- FrameworkContextData.cs
- ObjectReaderCompiler.cs
- HtmlPhoneCallAdapter.cs
- DataViewSetting.cs
- ApplicationException.cs
- KeyedHashAlgorithm.cs
- PropertyMetadata.cs
- SR.cs
- CodeSnippetExpression.cs
- ListCardsInFileRequest.cs
- mactripleDES.cs
- QuarticEase.cs
- ToolStripDropDownDesigner.cs
- HyperLinkColumn.cs
- ResourceAttributes.cs
- Point.cs
- ExternalCalls.cs
- HwndSubclass.cs
- ConfigXmlElement.cs
- FactoryGenerator.cs
- ListMarkerSourceInfo.cs
- DataBindingCollectionConverter.cs
- ProfilePropertySettingsCollection.cs
- RSAOAEPKeyExchangeFormatter.cs
- UnaryQueryOperator.cs
- SupportingTokenListenerFactory.cs
- FixedPage.cs
- WebPartConnection.cs
- ImportContext.cs
- PtsPage.cs
- SwitchExpression.cs
- SimpleNameService.cs
- NetworkInterface.cs