private string GetMailContent()
        {
            StreamReader sr       = new StreamReader(@"ScriptsAndReferences\DailyStatusReport.htm");
            string       mailBody = sr.ReadToEnd();

            sr.Close();

            mailBody = mailBody.Replace("{availability}", Availability.ToString("f2") + "%");
            mailBody = mailBody.Replace("{downloads}", Downloads.ToString("#,##0"));
            mailBody = mailBody.Replace("{restore}", Restore.ToString("#,##0"));
            if (Downloads == 0 || Restore == 0)
            {
                mailBody = mailBody.Replace("{warning}", "Please note that this report will not show the correct numbers for download and restore when ReplicatePackageStats Job is disabled or failing.");
            }
            else
            {
                mailBody = mailBody.Replace("{warning}", "");
            }
            mailBody = mailBody.Replace("{searchqueries}", SearchQueries.ToString("#,##0"));
            mailBody = mailBody.Replace("{uploads}", Uploads.ToString());
            mailBody = mailBody.Replace("{uniqueuploads}", UniqueUploads.ToString());
            mailBody = mailBody.Replace("{newusers}", NewUsers.ToString());
            mailBody = mailBody.Replace("{TrafficPerHour}", TrafficPerHour.ToString("#,##0"));
            mailBody = mailBody.Replace("{trafficmax}", TrafficMax.ToString("#,##0"));
            mailBody = mailBody.Replace("{trafficmin}", TrafficMin.ToString("#,##0"));
            mailBody = mailBody.Replace("{RequestPerHour}", RequestPerHour.ToString());
            mailBody = mailBody.Replace("{requestmax}", RequestMax.ToString());
            mailBody = mailBody.Replace("{requestmin}", RequestMin.ToString());
            mailBody = mailBody.Replace("{ErrorsPerHour}", ErrorsPerHour.ToString());
            mailBody = mailBody.Replace("{errormax}", ErrorsMax.ToString());
            mailBody = mailBody.Replace("{errormin}", ErrorsMin.ToString());
            mailBody = mailBody.Replace("{IndexLag}", IndexLag.ToString());
            mailBody = mailBody.Replace("{indexmax}", IndexMax.ToString());
            mailBody = mailBody.Replace("{indexmin}", IndexMin.ToString());
            mailBody = mailBody.Replace("{InstanceCount}", InstanceCount.ToString());
            mailBody = mailBody.Replace("{instancemax}", InstanceMax.ToString());
            mailBody = mailBody.Replace("{instancemin}", InstanceMin.ToString());
            mailBody = mailBody.Replace("{overallworkercount}", OverallWorkerCount.ToString());
            mailBody = mailBody.Replace("{successcount}", SuccessCount.ToString());
            mailBody = mailBody.Replace("{failedjobnames}", string.Join(", ", FailedJobNames));
            mailBody = mailBody.Replace("{notableissues}", string.Join("<br/>", NotableIssues));
            mailBody = mailBody.Replace("{InstallUpdatesRestoresPerNuGetVersion}", InstallUpdatesRestoresByNuGetVersion());
            mailBody = mailBody.Replace("{InstallUpdatesRestoresPerVSVersion}", InstallUpdatesRestoresByVSVersion());
            mailBody = mailBody.Replace("{IISRequestsDistribution}", CreateTableForIISRequestsDistribution());
            mailBody = mailBody.Replace("{IPRequestDistribution}", IPDetails());
            mailBody = mailBody.Replace("{ResponseTime}", ResponseTimeDetails());
            mailBody = mailBody.Replace("{UserAgent}", UserAgentDetails());
            return(mailBody);
        }
Exemplo n.º 2
0
    public override string ToString()
    {
        var  sb      = new StringBuilder("MessageCommitResult(");
        bool __first = true;

        if (RequestId != null && __isset.requestId)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("RequestId: ");
            RequestId.ToString(sb);
        }
        if (__isset.state)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("State: ");
            State.ToString(sb);
        }
        if (MessageStoreRequestId != null && __isset.messageStoreRequestId)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("MessageStoreRequestId: ");
            MessageStoreRequestId.ToString(sb);
        }
        if (MessageIds != null && __isset.messageIds)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("MessageIds: ");
            MessageIds.ToString(sb);
        }
        if (__isset.receiverCount)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("ReceiverCount: ");
            ReceiverCount.ToString(sb);
        }
        if (__isset.successCount)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("SuccessCount: ");
            SuccessCount.ToString(sb);
        }
        if (__isset.failCount)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("FailCount: ");
            FailCount.ToString(sb);
        }
        if (__isset.blockCount)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("BlockCount: ");
            BlockCount.ToString(sb);
        }
        if (__isset.unregisteredCount)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("UnregisteredCount: ");
            UnregisteredCount.ToString(sb);
        }
        if (__isset.unrelatedCount)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("UnrelatedCount: ");
            UnrelatedCount.ToString(sb);
        }
        if (ErrorDescription != null && __isset.errorDescription)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("ErrorDescription: ");
            ErrorDescription.ToString(sb);
        }
        sb.Append(")");
        return(sb.ToString());
    }
    public override string ToString()
    {
        var  sb      = new StringBuilder("UpdateBuddyProfileResult(");
        bool __first = true;

        if (RequestId != null && __isset.requestId)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("RequestId: ");
            RequestId.ToString(sb);
        }
        if (__isset.state)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("State: ");
            State.ToString(sb);
        }
        if (__isset.eventNo)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("EventNo: ");
            EventNo.ToString(sb);
        }
        if (__isset.receiverCount)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("ReceiverCount: ");
            ReceiverCount.ToString(sb);
        }
        if (__isset.successCount)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("SuccessCount: ");
            SuccessCount.ToString(sb);
        }
        if (__isset.failCount)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("FailCount: ");
            FailCount.ToString(sb);
        }
        if (__isset.cancelCount)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("CancelCount: ");
            CancelCount.ToString(sb);
        }
        if (__isset.unregisterCount)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("UnregisterCount: ");
            UnregisterCount.ToString(sb);
        }
        if (__isset.timestamp)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Timestamp: ");
            Timestamp.ToString(sb);
        }
        if (Message != null && __isset.message)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Message: ");
            Message.ToString(sb);
        }
        sb.Append(")");
        return(sb.ToString());
    }
Exemplo n.º 4
0
    public override string ToString()
    {
        var  sb      = new StringBuilder("CommitMessageResult(");
        bool __first = true;

        if (Message != null && __isset.message)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Message: ");
            Message.ToString(sb);
        }
        if (__isset.code)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Code: ");
            Code.ToString(sb);
        }
        if (Reason != null && __isset.reason)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Reason: ");
            Reason.ToString(sb);
        }
        if (__isset.successCount)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("SuccessCount: ");
            SuccessCount.ToString(sb);
        }
        if (__isset.failCount)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("FailCount: ");
            FailCount.ToString(sb);
        }
        if (__isset.unregisterCount)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("UnregisterCount: ");
            UnregisterCount.ToString(sb);
        }
        if (__isset.blockCount)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("BlockCount: ");
            BlockCount.ToString(sb);
        }
        sb.Append(")");
        return(sb.ToString());
    }