/// <summary> /// Create a new packager for the current process. /// </summary> /// <example> /// <code lang="CS" title="Create Package" description="Create a new package for the current process to send an email with all data available."> /// //Send an email with all of the information about the current application we haven't sent before. /// using(Packager packager = new Packager()) /// { /// packager.SendEmail(SessionCriteria.AllSessions, true, null); /// } /// </code> /// </example> /// <remarks>Only sessions for the current product & application will be considered</remarks> public Packager() { //We have to ping the log object to make sure everything has been initialized. (this might be the first thing ever done in this process with the agent) Monitor.Log.IsLoggingActive(); m_Packager = new Gibraltar.Data.Packager(); Initialize(); }
/// <summary> /// Create a new packager for the current process. /// </summary> /// <param name="productName">The product to package sessions for.</param> /// <param name="applicationName">Optional. Restricts the packager to considering sessions for just this application within the specified product.</param> /// <param name="directory">Optional. The log file directory on disk to look in for session files</param> /// <remarks> /// <para>If a repository folder is specified then only session files in that folder will be considered.</para> /// <para>If the application name is null then this will consider all applications for the specified product.</para> /// </remarks> public Packager(string productName, string applicationName = null, string directory = null) { //We have to ping the log object to make sure everything has been initialized. (this might be the first thing ever done in this process with the agent) Monitor.Log.IsLoggingActive(); //we aren't using our other overloads because the Packager class has its own logic for how things should override. m_Packager = new Gibraltar.Data.Packager(productName, applicationName, directory); Initialize(); }