Ejemplo n.º 1
0
        public void EnumerateEntries(QueryEntryDelegate entryDelegate,
                                     ref EnumerationContext context)
        {
            if ((QueryHandle != 0) && (entryDelegate != null))
            {
                UIntPtr entryHandle;

                do
                {
                    entryHandle = QueryStorage.GetNextEntry(QueryHandle,
                                                            ref EntryBuffer);

                    if (entryHandle != 0)
                    {
                        if (!entryDelegate(GetEventDescriptor(QueryStorage.GetController(),
                                                              EntryBuffer.Type),
                                           EntryBuffer,
                                           ref context))
                        {
                            break;
                        }
                    }
                } while (entryHandle != 0);
            }
        }
Ejemplo n.º 2
0
 public EventSource(string sourceName, EventingStorage storage, uint controlFlags)
 {
     SourceName   = sourceName;
     Storage      = storage;
     ControlFlags = controlFlags;
     if (storage != null)
     {
         HostController = storage.GetController();
     }
     else
     {
         HostController = Controller.GetLocalController();
     }
 }