예제 #1
0
 public static void Prompt(string program, bool pause)
 {
     Prompt(program, Auth.GetProgramAuth(program), pause, null);
 }
예제 #2
0
 public static void Prompt(string program)
 {
     Prompt(program, Auth.GetProgramAuth(program), true, null);
 }
예제 #3
0
        /// <summary>
        /// get a formatted description of information about this machine
        /// </summary>
        /// <param name="space"></param>
        /// <param name="program"></param>
        /// <param name="ex"></param>
        /// <returns></returns>
        public static string TicketContext(string space, string program, Exception ex)
        {
            string[] r    = new string[] { "Product:" + space, "Program:" + program, "Exception:" + (ex != null ? ex.Message : "n/a"), "StackTrace:" + (ex != null ? ex.StackTrace : "n/a"), "CommandLine:" + Environment.CommandLine, "OS:" + Environment.OSVersion.VersionString + " " + (IntPtr.Size * 8).ToString() + "bit", "CLR:" + Environment.Version.ToString(4), "TradeLink:" + TradeLink.Common.Util.TLSIdentity(), "Memory:" + Environment.WorkingSet.ToString(), "Processors:" + Environment.ProcessorCount.ToString(), "MID: " + Auth.GetCPUId() };
            string   desc = string.Join(Environment.NewLine, r);

            return(desc);
        }
예제 #4
0
 /// <summary>
 /// see if we're authorized on this machine
 /// </summary>
 /// <returns></returns>
 public bool isAuthorized()
 {
     return(isAuthorized(Auth.GetNetworkAddress()));
 }
예제 #5
0
        static string DecodedBody(string program, Exception ex, string data, bool addtemplate)
        {
            string[] r = new string[] { (addtemplate ? template() : string.Empty), "App:" + program, "Err:" + (ex != null ? ex.Message : "n/a"), "Trace:" + (ex != null ? ex.StackTrace : "n/a"), "OS:" + Environment.OSVersion.VersionString + " " + (IntPtr.Size * 8).ToString() + "bit", "CLR:" + Environment.Version.ToString(4), "TL:" + TradeLink.Common.Util.TLSIdentity(), "Mem:" + Environment.WorkingSet.ToString(), "Proc:" + Environment.ProcessorCount.ToString(), "MID:" + Auth.GetNetworkAddress(), "Date/Time: " + Util.ToTLDate() + "/" + Util.ToTLTime(), "Culture: " + System.Globalization.CultureInfo.CurrentCulture.EnglishName, data };

            string decoded = string.Join(Environment.NewLine, r);

            return(decoded);
        }