Beispiel #1
0
        /// <summary>
        ///     Converts the specified handle.
        /// </summary>
        /// <param name="handle">The handle.</param>
        /// <returns>IClrHandle.</returns>
        public IClrHandle Convert(ClrMd.ClrHandle handle)
        {
            if (handle == null)
            {
                return(null);
            }
            var item = new HandleAdapter(this, handle);

            return(Cache.GetOrAdd <IClrHandle>(handle, () => item, () => item.Setup()));
        }
Beispiel #2
0
 public void OpenHandle(string hostname)
 {
     try
     {
         if (fileHandle == null)
         {
             fileHandle = HandleAdapter.OpenHandle(hostname);
         }
     }
     catch (Exception e)
     {
         Logger.LogException("EventViewerPlugin.OpenEventLog", e);
         fileHandle = null;
     }
 }