本文整理汇总了C#中Deployment.GetInteger方法的典型用法代码示例。如果您正苦于以下问题:C# Deployment.GetInteger方法的具体用法?C# Deployment.GetInteger怎么用?C# Deployment.GetInteger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Deployment
的用法示例。
在下文中一共展示了Deployment.GetInteger方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetErrorCategory
private static ErrorCategory GetErrorCategory(Deployment.WindowsInstaller.Record record, out string resource)
{
resource = null;
if (1 < record.FieldCount)
{
int code = record.GetInteger(1);
if (1000 <= code && code < 25000)
{
// Specifically handle common errors.
switch (code)
{
case 1301:
case 1304:
resource = record.GetString(2);
return ErrorCategory.WriteError;
case 1303:
case 1306:
case 1718:
resource = record.GetString(2);
return ErrorCategory.PermissionDenied;
case 1305:
resource = record.GetString(2);
return ErrorCategory.ReadError;
case 1308:
case 1334:
resource = record.GetString(2);
return ErrorCategory.ResourceUnavailable;
case 1706:
resource = record.GetString(2);
return ErrorCategory.ResourceUnavailable;
case 1715:
case 1716:
case 1717:
resource = record.GetString(2);
return ErrorCategory.NotSpecified;
case 1935:
case 1937:
resource = record.GetString(6);
return ErrorCategory.InvalidData;
}
}
}
return ErrorCategory.NotSpecified;
}