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
- ReflectEventDescriptor.cs
- SimpleHandlerBuildProvider.cs
- HistoryEventArgs.cs
- TrustLevel.cs
- ProtectedProviderSettings.cs
- SignatureTargetIdManager.cs
- WindowsAuthenticationEventArgs.cs
- CapiSymmetricAlgorithm.cs
- EventHandlingScope.cs
- OrderPreservingMergeHelper.cs
- PropertyMap.cs
- MarshalByRefObject.cs
- SqlWebEventProvider.cs
- GridToolTip.cs
- SqlDataReader.cs
- CodeParameterDeclarationExpression.cs
- SessionStateSection.cs
- ProxyWebPart.cs
- DbConnectionPoolCounters.cs
- HtmlInputSubmit.cs
- CellCreator.cs
- NamedServiceModelExtensionCollectionElement.cs
- RSAPKCS1KeyExchangeFormatter.cs
- Knowncolors.cs
- BindingContext.cs
- DocumentXPathNavigator.cs
- SqlCacheDependencySection.cs
- processwaithandle.cs
- HttpResponse.cs
- XmlWriterDelegator.cs
- MouseActionConverter.cs
- PostBackOptions.cs
- SafeMarshalContext.cs
- PowerModeChangedEventArgs.cs
- StructuralComparisons.cs
- ScrollProperties.cs
- ECDsaCng.cs
- BasicCommandTreeVisitor.cs
- XmlCustomFormatter.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- SiteMapPath.cs
- BaseDataListDesigner.cs
- StrongNameMembershipCondition.cs
- BindableAttribute.cs
- MSAANativeProvider.cs
- DataGridViewRowConverter.cs
- FixedMaxHeap.cs
- IndexedString.cs
- BitmapCodecInfo.cs
- CheckBox.cs
- Compiler.cs
- PrintingPermission.cs
- SweepDirectionValidation.cs
- DrawingCollection.cs
- NonBatchDirectoryCompiler.cs
- DateTimeFormat.cs
- ContainsRowNumberChecker.cs
- SqlFactory.cs
- EventSetter.cs
- PrintDialog.cs
- XhtmlBasicTextViewAdapter.cs
- TaiwanLunisolarCalendar.cs
- FastPropertyAccessor.cs
- ViewStateAttachedPropertyFeature.cs
- QilInvoke.cs
- BridgeDataReader.cs
- FormViewDeletedEventArgs.cs
- WizardStepBase.cs
- LinqDataSource.cs
- WebPageTraceListener.cs
- ContextMarshalException.cs
- RuntimeResourceSet.cs
- PaintEvent.cs
- RecognizerInfo.cs
- DataException.cs
- PresentationTraceSources.cs
- DbProviderFactoriesConfigurationHandler.cs
- DataGridViewRowConverter.cs
- LexicalChunk.cs
- FatalException.cs
- ActivityDesignerAccessibleObject.cs
- MenuItemStyleCollection.cs
- TextWriterTraceListener.cs
- MailDefinition.cs
- RemotingConfiguration.cs
- ObjectStorage.cs
- ColumnMapVisitor.cs
- DrawingContextDrawingContextWalker.cs
- DefaultPrintController.cs
- ModelVisual3D.cs
- DecimalConstantAttribute.cs
- BindingMemberInfo.cs
- PackagePartCollection.cs
- infer.cs
- JournalEntryStack.cs
- TextSpan.cs
- RunInstallerAttribute.cs
- NoPersistProperty.cs
- CompoundFileStorageReference.cs
- GeometryModel3D.cs