protected override void RenderChanges() { PowerShellResults <AdminAuditLogDetailRow> powerShellResults = base.Results as PowerShellResults <AdminAuditLogDetailRow>; if (powerShellResults != null && powerShellResults.Output != null && powerShellResults.Succeeded && powerShellResults.Output.Length > 0) { Table table = new Table(); int num = 0; while (num < powerShellResults.Output.Length && num < 500) { AdminAuditLogDetailRow adminAuditLogDetailRow = powerShellResults.Output[num]; table.Rows.Add(base.GetDetailRowForTable(string.Format("<b>{0}</b>", Strings.AuditLogDateSDO))); table.Rows.Add(base.GetDetailRowForTable(adminAuditLogDetailRow.AdminAuditLogEvent.RunDate.Value.ToUniversalTime().UtcToUserDateTimeString())); table.Rows.Add(base.GetEmptyRowForTable()); table.Rows.Add(base.GetDetailRowForTable(string.Format("<b>{0}</b>", Strings.AuditLogUserSDO))); table.Rows.Add(base.GetDetailRowForTable(adminAuditLogDetailRow.UserFriendlyCaller)); table.Rows.Add(base.GetEmptyRowForTable()); table.Rows.Add(base.GetDetailRowForTable(string.Format("<b>{0}</b>", Strings.AuditLogCmdletSDO))); table.Rows.Add(base.GetDetailRowForTable(adminAuditLogDetailRow.AdminAuditLogEvent.CmdletName)); table.Rows.Add(base.GetEmptyRowForTable()); table.Rows.Add(base.GetDetailRowForTable(string.Format("<b>{0}</b>", Strings.AuditLogCmdletParameters))); table.Rows.Add(base.GetDetailRowForTable(this.FormatParameters(adminAuditLogDetailRow.AdminAuditLogEvent.CmdletParameters))); table.Rows.Add(base.GetEmptyRowForTable()); num++; } if (table.Rows.Count > 0) { this.detailsPane.Controls.Add(table); return; } table.Dispose(); } }
protected override void RenderChanges() { PowerShellResults <AdminAuditLogDetailRow> powerShellResults = base.Results as PowerShellResults <AdminAuditLogDetailRow>; if (powerShellResults != null && powerShellResults.Output != null && powerShellResults.Succeeded && powerShellResults.Output.Length > 0) { Table table = new Table(); int num = 0; while (num < powerShellResults.Output.Length && num < 500) { AdminAuditLogDetailRow adminAuditLogDetailRow = powerShellResults.Output[num]; foreach (AdminAuditLogCmdletParameter adminAuditLogCmdletParameter in adminAuditLogDetailRow.AdminAuditLogEvent.CmdletParameters) { if (adminAuditLogCmdletParameter.Name.Equals("LitigationHoldEnabled", StringComparison.InvariantCultureIgnoreCase)) { table.Rows.Add(base.GetDetailRowForTable(adminAuditLogDetailRow.AdminAuditLogEvent.RunDate.Value.ToUniversalTime().UtcToUserDateTimeString())); table.Rows.Add(base.GetDetailRowForTable(adminAuditLogDetailRow.UserFriendlyCaller)); table.Rows.Add(base.GetDetailRowForTable(this.GetLocalizedState(adminAuditLogCmdletParameter.Value))); table.Rows.Add(base.GetEmptyRowForTable()); break; } } num++; } if (table.Rows.Count > 0) { this.detailsPane.Controls.Add(table); return; } table.Dispose(); } }
protected override void RenderChanges() { PowerShellResults <AdminAuditLogDetailRow> powerShellResults = base.Results as PowerShellResults <AdminAuditLogDetailRow>; if (powerShellResults != null && powerShellResults.Output != null && powerShellResults.Output.Length > 0 && powerShellResults.Succeeded) { Table table = new Table(); int num = 0; while (num < powerShellResults.Output.Length && num < 500) { AdminAuditLogDetailRow adminAuditLogDetailRow = powerShellResults.Output[num]; table.Rows.Add(base.GetDetailRowForTable(adminAuditLogDetailRow.AdminAuditLogEvent.RunDate.Value.ToUniversalTime().UtcToUserDateTimeString())); table.Rows.Add(base.GetDetailRowForTable(adminAuditLogDetailRow.UserFriendlyCaller)); string text = null; string text2 = null; foreach (AdminAuditLogCmdletParameter adminAuditLogCmdletParameter in adminAuditLogDetailRow.AdminAuditLogEvent.CmdletParameters) { if (adminAuditLogCmdletParameter.Name.Equals("Members", StringComparison.InvariantCultureIgnoreCase) || adminAuditLogCmdletParameter.Name.Equals("Member", StringComparison.InvariantCultureIgnoreCase)) { text = AuditHelper.MakeUserFriendly(adminAuditLogCmdletParameter.Value); } if (adminAuditLogCmdletParameter.Name.Equals("Roles", StringComparison.InvariantCultureIgnoreCase) || adminAuditLogCmdletParameter.Name.Equals("Role", StringComparison.InvariantCultureIgnoreCase)) { text2 = adminAuditLogCmdletParameter.Value; } } if (adminAuditLogDetailRow.AdminAuditLogEvent.CmdletName.Equals("New-RoleGroup", StringComparison.InvariantCultureIgnoreCase) || adminAuditLogDetailRow.AdminAuditLogEvent.CmdletName.Equals("Remove-RoleGroup", StringComparison.InvariantCultureIgnoreCase)) { table.Rows.Add(base.GetDetailRowForTable(this.GetLocalizedAction(adminAuditLogDetailRow.AdminAuditLogEvent.CmdletName))); } if (text != null) { StringBuilder stringBuilder = new StringBuilder(); if (adminAuditLogDetailRow.AdminAuditLogEvent.CmdletName.Equals("Update-RoleGroupMember", StringComparison.InvariantCultureIgnoreCase)) { stringBuilder.Append(Strings.UpdatedMembers); } else { stringBuilder.Append(Strings.AddedMembers); } stringBuilder.Append(AntiXssEncoder.HtmlEncode(text, false)); table.Rows.Add(base.GetDetailRowForTable(stringBuilder.ToString())); } if (text2 != null) { StringBuilder stringBuilder2 = new StringBuilder(); stringBuilder2.Append(Strings.AddedRoles); stringBuilder2.Append(text2); table.Rows.Add(base.GetDetailRowForTable(stringBuilder2.ToString())); } table.Rows.Add(base.GetEmptyRowForTable()); num++; } if (table.Rows.Count > 0) { this.detailsPane.Controls.Add(table); } } }