/// <summary>
 /// Return the path to the exported files associated with an application
 /// </summary>
 public static string GetApplicationPath(ExportAddInConfiguration config, ISessionSummary sessionSummary)
 {
     var info = sessionSummary;
     var subFolder = Path.Combine(info.Product, info.Application);
     subFolder = illegalInPath.Replace(subFolder, "_");
     var fullPath = Path.Combine(config.SessionExportPath, subFolder);
     return fullPath;
 }
 /// <summary>
 /// Create a new session summary as the live collection session for the current process
 /// </summary>
 /// <remarks>This constructor figures out all of the summary information when invoked, which can take a moment.</remarks>
 internal SessionSummary(ISessionSummary summary)
 {
     m_WrappedISessionSummary = summary;
     m_Properties             = new Dictionary <string, string>(summary.Properties);
 }
        /// <summary>
        /// Upload the session summary for one session.
        /// </summary>
        /// <param name="sessionSummary"></param>
        private async Task PerformSessionHeaderUpload(ISessionSummary sessionSummary)
        {
            SessionXml sessionSummaryXml = DataConverter.ToSessionXml(sessionSummary);

            await PerformSessionHeaderUpload(sessionSummaryXml).ConfigureAwait(false);
        }
 private bool MatchOnUserName(ISessionSummary summary)
 {
     return MatchString(summary.UserName, txtValue.Text);
 }
 private bool MatchOnDnsDomainName(ISessionSummary summary)
 {
     return MatchString(summary.DnsDomainName, txtValue.Text);
 }
 private bool MatchOnCommandLine(ISessionSummary summary)
 {
     return MatchString(summary.CommandLine, txtValue.Text);
 }
 private bool MatchOnApplicationDescription(ISessionSummary summary)
 {
     return MatchString(summary.ApplicationDescription, txtValue.Text);
 }
Example #8
0
 /// <summary>
 /// Inserts an item to the <see cref="T:System.Collections.Generic.IList`1"/> at the specified index.
 /// </summary>
 /// <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.
 ///                 </param><param name="item">The object to insert into the <see cref="T:System.Collections.Generic.IList`1"/>.
 ///                 </param><exception cref="T:System.ArgumentOutOfRangeException"><paramref name="index"/> is not a valid index in the <see cref="T:System.Collections.Generic.IList`1"/>.
 ///                 </exception><exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.IList`1"/> is read-only.
 ///                 </exception>
 public void Insert(int index, ISessionSummary item)
 {
     throw new NotSupportedException("Inserting an item into the collection at a specific location is not supported.");
 }
 private bool MatchOnDnsDomainName(ISessionSummary summary)
 {
     return(MatchString(summary.DnsDomainName, txtValue.Text));
 }
 private bool MatchOnCommandLine(ISessionSummary summary)
 {
     return(MatchString(summary.CommandLine, txtValue.Text));
 }
 private bool MatchOnApplicationDescription(ISessionSummary summary)
 {
     return(MatchString(summary.ApplicationDescription, txtValue.Text));
 }
 /// <summary>
 /// FullApplicationName is guaranteed to only have a period between Product and Application
 /// </summary>
 public static string FullApplicationName(this ISessionSummary summary)
 {
     // Simplify parsing by ensuring no embedded periods in Product or Application
     return(summary.Product.Replace(".", " ") + "." + summary.Application.Replace(".", " "));
 }
Example #13
0
 /// <summary>
 /// Adds an item to the <see cref="T:System.Collections.Generic.ICollection`1"/>.
 /// </summary>
 /// <param name="item">The object to add to the <see cref="T:System.Collections.Generic.ICollection`1"/>.
 ///                 </param><exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only.
 ///                 </exception>
 public void Add(ISessionSummary item)
 {
     AddItem(item);
 }
Example #14
0
 /// <summary>
 /// Removes the first occurrence of a specific object from the <see cref="T:System.Collections.Generic.ICollection`1"/>.
 /// </summary>
 /// <returns>
 /// true if <paramref name="item"/> was successfully removed from the <see cref="T:System.Collections.Generic.ICollection`1"/>; otherwise, false. This method also returns false if <paramref name="item"/> is not found in the original <see cref="T:System.Collections.Generic.ICollection`1"/>.
 /// </returns>
 /// <param name="item">The object to remove from the <see cref="T:System.Collections.Generic.ICollection`1"/>.
 ///                 </param><exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only.
 ///                 </exception>
 public bool Remove(ISessionSummary item)
 {
     return(RemoveItem(item));
 }
 private bool MatchOnUserName(ISessionSummary summary)
 {
     return(MatchString(summary.UserName, txtValue.Text));
 }
Example #16
0
 /// <summary>
 /// Attempt to get the item with the specified key, returning true if it could be found
 /// </summary>
 /// <returns>True if the item could be found, false otherwise</returns>
 public bool TryGetValue(Guid key, out ISessionSummary item)
 {
     throw new NotImplementedException();
 }
 /// <summary>
 /// Display the contents of the folder configured for session exports
 /// </summary>
 /// <param name="sessionSummary"></param>
 private void ProcessViewCommand(ISessionSummary sessionSummary)
 {
     var configuration = _addInContext.Configuration.Common as ExportAddInConfiguration;
     if (configuration == null
         || string.IsNullOrEmpty(configuration.SessionExportPath)
         || !Directory.Exists(configuration.SessionExportPath))
     {
         MessageBox.Show("Session Export is not configured with a valid base path. "
                         + "You must first configure the Export Sessions add-in.",
             "Session Export not Configured", MessageBoxButtons.OK, MessageBoxIcon.Information,
             MessageBoxDefaultButton.Button1, (MessageBoxOptions)0x40000); // MB_TOPMOST
     }
     else
     {
         var applicationPath = StreamCreator.GetApplicationPath(configuration, sessionSummary);
         System.Diagnostics.Process.Start(applicationPath);
     }
 }