Added functionality of Service Levels

This commit is contained in:
vfedosevich 2014-09-11 22:23:48 +03:00
parent 4c58752483
commit b1c52c36eb
39 changed files with 2282 additions and 175 deletions

View file

@ -177,4 +177,7 @@
<data name="locTitleArchiving.Text" xml:space="preserve">
<value>Archiving Mailboxes</value>
</data>
<data name="gvServiceLevel.Header" xml:space="preserve">
<value>Service Level</value>
</data>
</root>

View file

@ -246,4 +246,13 @@
<data name="chkInherit.Text" xml:space="preserve">
<value>Update Services</value>
</data>
<data name="locServiceLevel.Text" xml:space="preserve">
<value>Service Level:</value>
</data>
<data name="locVIPUser.Text" xml:space="preserve">
<value>VIP:</value>
</data>
<data name="secServiceLevels.Text" xml:space="preserve">
<value>Service Level Information</value>
</data>
</root>

View file

@ -180,4 +180,7 @@
<data name="gvUsersLogin.Header" xml:space="preserve">
<value>Login</value>
</data>
<data name="gvServiceLevel.Header" xml:space="preserve">
<value>Service Level</value>
</data>
</root>

View file

@ -213,7 +213,9 @@ namespace WebsitePanel.Portal.ExchangeServer
null,
null,
user.ExternalEmail,
txtSubscriberNumber.Text);
txtSubscriberNumber.Text,
0,
false);
}

View file

@ -52,10 +52,16 @@
OnRowCommand="gvMailboxes_RowCommand" AllowPaging="True" AllowSorting="True"
DataSourceID="odsAccountsPaged" PageSize="20">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Image ID="img2" runat="server" Width="16px" Height="16px" ImageUrl='<%# GetStateImage((bool)Eval("Locked"),(bool)Eval("Disabled")) %>' ImageAlign="AbsMiddle" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="gvMailboxesDisplayName" SortExpression="DisplayName">
<ItemStyle Width="40%"></ItemStyle>
<ItemStyle Width="20%"></ItemStyle>
<ItemTemplate>
<asp:Image ID="img1" runat="server" ImageUrl='<%# GetAccountImage((int)Eval("AccountType")) %>' ImageAlign="AbsMiddle" />
<asp:Image ID="img1" runat="server" ImageUrl='<%# GetAccountImage((int)Eval("AccountType"),(bool)Eval("IsVIP")) %>' ImageAlign="AbsMiddle" />
<asp:Label runat="server" Text='<%# (bool)Eval("IsVIP") ? "*" : string.Empty %>' style="font-weight:bold;"/>
<asp:hyperlink id="lnk1" runat="server"
NavigateUrl='<%# GetMailboxEditUrl(Eval("AccountId").ToString()) %>'>
<%# Eval("DisplayName") %>
@ -63,7 +69,7 @@
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="gvUsersLogin" SortExpression="UserPrincipalName">
<ItemStyle></ItemStyle>
<ItemStyle Width="20%"></ItemStyle>
<ItemTemplate>
<asp:hyperlink id="lnk2" runat="server"
NavigateUrl='<%# GetOrganizationUserEditUrl(Eval("AccountId").ToString()) %>'>
@ -71,6 +77,14 @@
</asp:hyperlink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="gvServiceLevel">
<ItemStyle Width="20%"></ItemStyle>
<ItemTemplate>
<asp:Label id="lbServLevel" runat="server" ToolTip = '<%# GetServiceLevel((int)Eval("LevelId")).LevelDescription%>'>
<%# GetServiceLevel((int)Eval("LevelId")).LevelName%>
</asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="gvMailboxesEmail" DataField="PrimaryEmailAddress" SortExpression="PrimaryEmailAddress" ItemStyle-Width="25%" />
<asp:BoundField HeaderText="gvSubscriberNumber" DataField="SubscriberNumber" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="gvMailboxesMailboxPlan" DataField="MailboxPlan" SortExpression="MailboxPlan" ItemStyle-Width="50%" />

View file

@ -27,9 +27,11 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Linq;
using System.Web.UI.WebControls;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.EnterpriseServer.Base.HostedSolution;
namespace WebsitePanel.Portal.ExchangeServer
{
@ -43,6 +45,8 @@ namespace WebsitePanel.Portal.ExchangeServer
}
}
private ServiceLevel[] ServiceLevels;
protected void Page_Load(object sender, EventArgs e)
{
locTitle.Text = ArchivingBoxes ? GetLocalizedString("locTitleArchiving.Text") : GetLocalizedString("locTitle.Text");
@ -54,14 +58,23 @@ namespace WebsitePanel.Portal.ExchangeServer
BindStats();
}
BindServiceLevels();
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_ISCONSUMER))
{
if (cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue != 1)
{
gvMailboxes.Columns[3].Visible = false;
gvMailboxes.Columns[4].Visible = false;
}
}
gvMailboxes.Columns[3].Visible = cntx.Groups.ContainsKey(ResourceGroups.ServiceLevels);
}
private void BindServiceLevels()
{
ServiceLevels = ES.Services.Organizations.GetSupportServiceLevels();
}
private void BindStats()
@ -96,7 +109,7 @@ namespace WebsitePanel.Portal.ExchangeServer
}
}
public string GetAccountImage(int accountTypeId)
public string GetAccountImage(int accountTypeId, bool vip)
{
ExchangeAccountType accountType = (ExchangeAccountType)accountTypeId;
string imgName = "mailbox_16.gif";
@ -109,6 +122,21 @@ namespace WebsitePanel.Portal.ExchangeServer
else if (accountType == ExchangeAccountType.Equipment)
imgName = "equipment_16.gif";
if (vip) imgName = "admin_16.png";
return GetThemedImage("Exchange/" + imgName);
}
public string GetStateImage(bool locked, bool disabled)
{
string imgName = "enabled.png";
if (locked)
imgName = "locked.png";
else
if (disabled)
imgName = "disabled.png";
return GetThemedImage("Exchange/" + imgName);
}
@ -166,5 +194,10 @@ namespace WebsitePanel.Portal.ExchangeServer
{
e.InputParameters["archiving"] = ArchivingBoxes;
}
public ServiceLevel GetServiceLevel(int levelId)
{
return ServiceLevels.Where(x => x.LevelId == levelId).DefaultIfEmpty(new ServiceLevel { LevelName = "", LevelDescription = "" }).FirstOrDefault();
}
}
}

View file

@ -1,31 +1,3 @@
// Copyright (c) 2014, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.

View file

@ -167,7 +167,9 @@ namespace WebsitePanel.Portal.HostedSolution
null,
null,
user.ExternalEmail,
txtSubscriberNumber.Text);
txtSubscriberNumber.Text,
0,
false);
}
}
}

View file

@ -117,12 +117,34 @@
<asp:TextBox ID="txtNotes" runat="server" CssClass="TextBox200" Rows="4" TextMode="MultiLine"></asp:TextBox>
</td>
</tr>
</table>
</table>
<wsp:CollapsiblePanel id="secServiceLevels" runat="server" IsCollapsed="true"
TargetControlID="ServiceLevels" meta:resourcekey="secServiceLevels" Text="Service Level Information">
</wsp:CollapsiblePanel>
<asp:Panel ID="ServiceLevels" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td class="FormLabel150"><asp:Localize ID="locServiceLevel" runat="server" meta:resourcekey="locServiceLevel" Text="Service Level:"></asp:Localize></td>
<td>
<asp:DropDownList ID="ddlServiceLevels" DataValueField="LevelId" DataTextField="LevelName" runat="server"></asp:DropDownList>
</td>
</tr>
<tr>
<td class="FormLabel150"><asp:Localize ID="locVIPUser" runat="server" meta:resourcekey="locVIPUser" Text="VIP:"></asp:Localize></td>
<td>
<asp:CheckBox ID="chkVIP" runat="server"/>
</td>
</tr>
</table>
</asp:Panel>
<wsp:CollapsiblePanel id="secCompanyInfo" runat="server" IsCollapsed="true"
TargetControlID="CompanyInfo" meta:resourcekey="secCompanyInfo" Text="Company Information">
</wsp:CollapsiblePanel>
<asp:Panel ID="CompanyInfo" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
@ -207,6 +229,7 @@
<wsp:CollapsiblePanel id="secAddressInfo" runat="server" IsCollapsed="true"
TargetControlID="AddressInfo" meta:resourcekey="secAddressInfo" Text="Address">
</wsp:CollapsiblePanel>
<asp:Panel ID="AddressInfo" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>

View file

@ -27,8 +27,11 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI.WebControls;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.EnterpriseServer.Base.HostedSolution;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.ResultObjects;
@ -40,6 +43,8 @@ namespace WebsitePanel.Portal.HostedSolution
{
if (!IsPostBack)
{
BindServiceLevels();
BindSettings();
MailboxTabsId.Visible = (PanelRequest.Context == "Mailbox");
@ -81,6 +86,18 @@ namespace WebsitePanel.Portal.HostedSolution
txtInitials.Text = user.Initials;
txtLastName.Text = user.LastName;
if (user.LevelId > 0 && secServiceLevels.Visible)
{
ServiceLevel serviceLevel = ES.Services.Organizations.GetSupportServiceLevel(user.LevelId);
if (ddlServiceLevels.Items.FindByValue(serviceLevel.LevelId.ToString()) == null)
ddlServiceLevels.Items.Add(new ListItem(serviceLevel.LevelName, serviceLevel.LevelId.ToString()));
ddlServiceLevels.Items.FindByValue(string.Empty).Selected = false;
ddlServiceLevels.Items.FindByValue(serviceLevel.LevelId.ToString()).Selected = true;
}
chkVIP.Checked = user.IsVIP && secServiceLevels.Visible;
txtJobTitle.Text = user.JobTitle;
txtCompany.Text = user.Company;
txtDepartment.Text = user.Department;
@ -196,6 +213,51 @@ namespace WebsitePanel.Portal.HostedSolution
}
}
private void BindServiceLevels()
{
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
if (cntx.Groups.ContainsKey(ResourceGroups.ServiceLevels))
{
List<ServiceLevel> enabledServiceLevels = new List<ServiceLevel>();
foreach (var quota in cntx.Quotas.Where(x => x.Key.Contains(Quotas.SERVICE_LEVELS)))
{
foreach (var serviceLevel in ES.Services.Organizations.GetSupportServiceLevels())
{
if (quota.Key.Replace(Quotas.SERVICE_LEVELS, "") == serviceLevel.LevelName && CheckServiceLevelQuota(quota.Value, serviceLevel.LevelId))
{
enabledServiceLevels.Add(serviceLevel);
}
}
}
ddlServiceLevels.DataSource = enabledServiceLevels;
ddlServiceLevels.DataTextField = "LevelName";
ddlServiceLevels.DataValueField = "LevelId";
ddlServiceLevels.DataBind();
ddlServiceLevels.Items.Insert(0, new ListItem("<Select Service Level>", string.Empty));
ddlServiceLevels.Items.FindByValue(string.Empty).Selected = true;
secServiceLevels.Visible = true;
}
else { secServiceLevels.Visible = false; }
}
private bool CheckServiceLevelQuota(QuotaValueInfo quota, int levelID)
{
quota.QuotaUsedValue = ES.Services.Organizations.SearchAccounts(PanelRequest.ItemID, "", "", "", true).Where(x => x.LevelId == levelID).Count();
if (quota.QuotaAllocatedValue != -1)
{
return quota.QuotaAllocatedValue > quota.QuotaUsedValue;
}
return true;
}
private void SaveSettings()
{
if (!Page.IsValid)
@ -235,7 +297,9 @@ namespace WebsitePanel.Portal.HostedSolution
txtWebPage.Text,
txtNotes.Text,
txtExternalEmailAddress.Text,
txtSubscriberNumber.Text);
txtSubscriberNumber.Text,
string.IsNullOrEmpty(ddlServiceLevels.SelectedValue) ? 0 : int.Parse(ddlServiceLevels.SelectedValue),
chkVIP.Checked);
if (result < 0)
{

View file

@ -1,31 +1,3 @@
// Copyright (c) 2014, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
@ -346,6 +318,60 @@ namespace WebsitePanel.Portal.HostedSolution {
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtNotes;
/// <summary>
/// secServiceLevels control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secServiceLevels;
/// <summary>
/// ServiceLevels control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel ServiceLevels;
/// <summary>
/// locServiceLevel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locServiceLevel;
/// <summary>
/// ddlServiceLevels control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlServiceLevels;
/// <summary>
/// locVIPUser control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locVIPUser;
/// <summary>
/// chkVIP control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkVIP;
/// <summary>
/// secCompanyInfo control.
/// </summary>

View file

@ -59,9 +59,10 @@
</asp:TemplateField>
<asp:TemplateField HeaderText="gvUsersDisplayName" SortExpression="DisplayName">
<ItemStyle Width="50%"></ItemStyle>
<ItemStyle Width="25%"></ItemStyle>
<ItemTemplate>
<asp:Image ID="img1" runat="server" ImageUrl='<%# GetAccountImage((int)Eval("AccountType")) %>' ImageAlign="AbsMiddle" />
<asp:Image ID="img1" runat="server" ImageUrl='<%# GetAccountImage((int)Eval("AccountType"),(bool)Eval("IsVIP")) %>' ImageAlign="AbsMiddle"/>
<asp:Label runat="server" Text='<%# (bool)Eval("IsVIP") ? "*" : string.Empty %>' style="font-weight:bold;"/>
<asp:hyperlink id="lnk1" runat="server"
NavigateUrl='<%# GetUserEditUrl(Eval("AccountId").ToString()) %>'>
<%# Eval("DisplayName") %>
@ -69,8 +70,16 @@
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="gvUsersLogin" DataField="UserPrincipalName" SortExpression="UserPrincipalName" ItemStyle-Width="25%" />
<asp:TemplateField HeaderText="gvServiceLevel">
<ItemStyle Width="25%"></ItemStyle>
<ItemTemplate>
<asp:Label id="lbServLevel" runat="server" ToolTip = '<%# GetServiceLevel((int)Eval("LevelId")).LevelDescription%>'>
<%# GetServiceLevel((int)Eval("LevelId")).LevelName%>
</asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="gvUsersEmail" DataField="PrimaryEmailAddress" SortExpression="PrimaryEmailAddress" ItemStyle-Width="25%" />
<asp:BoundField HeaderText="gvSubscriberNumber" DataField="SubscriberNumber" ItemStyle-Width="25%" />
<asp:BoundField HeaderText="gvSubscriberNumber" DataField="SubscriberNumber" ItemStyle-Width="20%" />
<asp:TemplateField ItemStyle-Wrap="False">
<ItemTemplate>
<asp:ImageButton ID="Image2" runat="server" Width="16px" Height="16px" ToolTip="Mail" ImageUrl='<%# GetMailImage((int)Eval("AccountType")) %>' CommandName="OpenMailProperties" CommandArgument='<%# Eval("AccountId") %>' Enabled=<%# EnableMailImageButton((int)Eval("AccountType")) %>/>

View file

@ -27,32 +27,42 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI.WebControls;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.EnterpriseServer.Base.HostedSolution;
namespace WebsitePanel.Portal.HostedSolution
{
public partial class OrganizationUsers : WebsitePanelModuleBase
{
private ServiceLevel[] ServiceLevels;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
{
BindStats();
}
BindServiceLevels();
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_ISCONSUMER))
{
if (cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue != 1)
{
gvUsers.Columns[4].Visible = false;
gvUsers.Columns[5].Visible = false;
}
}
gvUsers.Columns[3].Visible = cntx.Groups.ContainsKey(ResourceGroups.ServiceLevels);
}
private void BindServiceLevels()
{
ServiceLevels = ES.Services.Organizations.GetSupportServiceLevels();
}
private void BindStats()
@ -164,7 +174,7 @@ namespace WebsitePanel.Portal.HostedSolution
}
public string GetAccountImage(int accountTypeId)
public string GetAccountImage(int accountTypeId, bool vip)
{
string imgName = string.Empty;
@ -181,6 +191,7 @@ namespace WebsitePanel.Portal.HostedSolution
imgName = "admin_16.png";
break;
}
if (vip) imgName = "admin_16.png";
return GetThemedImage("Exchange/" + imgName);
}
@ -298,8 +309,9 @@ namespace WebsitePanel.Portal.HostedSolution
return accountID.ToString() + "|" + IsOCS.ToString() + "|" + IsLync.ToString();
}
public ServiceLevel GetServiceLevel(int levelId)
{
return ServiceLevels.Where(x => x.LevelId == levelId).DefaultIfEmpty(new ServiceLevel { LevelName = "", LevelDescription = "" }).FirstOrDefault();
}
}
}

View file

@ -1,31 +1,3 @@
// Copyright (c) 2014, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.