Example #1
0
 internal string SerializeUnencrypted()
 {
     return("Domain: " + Domain.Replace('\n', ' ') + "\n" +
            "OwnerName: " + OwnerName.Replace('\n', ' ') + "\n" +
            "Issued: " + Issued.ToString() + "\n" +
            "Expires: " + Expires.ToString() + "\n" +
            "Features: " + Join(Features) + "\n");
 }
Example #2
0
        public string SerializeUnencrypted()
        {
            string expires = Expires.HasValue ? Expires.Value.ToUniversalTime().ToString() : string.Empty;

            return("Domain: " + Domain.Replace('\n', ' ') + "\n" +
                   "OwnerName: " + OwnerName.Replace('\n', ' ') + "\n" +
                   "Issued: " + Issued.ToString() + "\n" +
                   "Expires: " + expires + "\n" +
                   "Features: " + Join(Features) + "\n");
        }
Example #3
0
        public string GetShortDescription()
        {
            var sb = new StringBuilder(OwnerName + " - " + Domain + " - " + Issued.ToString() + " - " + Expires.ToString() + " - ");

            foreach (var id in Features)
            {
                sb.Append(id + " ");
            }
            return(sb.ToString().TrimEnd());
        }
Example #4
0
            /// <summary>
            /// Returns a human readable, single-line description of the license
            /// </summary>
            /// <returns></returns>
            internal string GetShortDescription()
            {
                StringBuilder sb = new StringBuilder(OwnerName + " - " + Domain + " - " + Issued.ToString() + " - " + Expires.ToString() + " - ");

                foreach (var id in Features)
                {
                    sb.Append(GetFriendlyName(id) + " ");
                }
                return(sb.ToString().TrimEnd());
            }
Example #5
0
        public string GetTitle()
        {
            switch (Status)
            {
            case OutstandingStatus:
                return(string.Format(Properties.Resources.MessageFormatLine1, Status, Issued.ToString("dd/MM/yyyy HH:mm:ss")));

                break;

            case AcceptedStatus:
                return(string.Format(Properties.Resources.MessageFormatLine1, Status, Accepted.Value.ToString("dd/MM/yyyy HH:mm:ss")));

                break;

            case CompletedStatus:
                return(string.Format(Properties.Resources.MessageFormatLine1, Status, Completed.Value.ToString("dd/MM/yyyy HH:mm:ss")));

                break;

            default:
                return(string.Format(Properties.Resources.MessageFormatLine1a, Status));
            }
            ;
        }
Example #6
0
 public override string ToString()
 {
     return(this.MeasurementResult.ToString() + "(" + Issued.ToString() + ")");
 }