- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
Byte[] content = setting.RecipientType == ReportRecipientType.A?
Processor.Process(Encoding.ASCII.GetBytes(report.Value),"A",String.Empty) :
setting.RecipientType == ReportRecipientType.B || setting.RecipientType == ReportRecipientType.BX?
Processor.Process (Encoding.ASCII.GetBytes(report.Value), "B", String.Empty) :
setting.RecipientType == ReportRecipientType.C?
Processor.Process (Encoding.UTF8.GetBytes(report.Value), "C", String.Empty) :
setting.RecipientType == ReportRecipientType.D?
Processor.Process (Encoding.UTF8.GetBytes(report.Value), "D", String.Empty) :
Processor.Process (Encoding.UTF8.GetBytes(report.Value), filename, DateTime.Now, setting.data);
Имена переменных и методов обфусцированы, но суть не в них.
Какой сумрачный гений родил такую управляющую структуру?
someone 12.07.2013 01:22 # +1
Lure Of Chaos 12.07.2013 09:30 # 0
kegdan 12.07.2013 14:37 # 0
kegdan 12.07.2013 14:38 # 0
Byte[] content;
if (setting.RecipientType == ReportRecipientType.A)
{
content = Processor.Process(Encoding.ASCII.GetByte s(report.Value), "A", String.Empty);
}
else
{
if (setting.RecipientType == ReportRecipientType.B || setting.RecipientType == ReportRecipientType.BX)
{
content = Processor.Process(Encoding.ASCII.GetByte s(report.Value), "B", String.Empty);
}
else
{
if (setting.RecipientType == ReportRecipientType.C)
{
content = Processor.Process(Encoding.UTF8.GetBytes (report.Value), "C", String.Empty);
}
else
{
if (setting.RecipientType == ReportRecipientType.D)
{
content = Processor.Process(Encoding.UTF8.GetBytes (report.Value), "D", String.Empty);
}
else
{
content = Processor.Process (Encoding.UTF8.GetBytes(report.Value), filename, DateTime.Now, setting.data);
}
}
}
}
kegdan 12.07.2013 14:58 # 0
Byte[] content;
switch (setting.RecipientType)
{
case ReportRecipientType.A:
case ReportRecipientType.B:
case ReportRecipientType.C:
case ReportRecipientType.D:
content = Processor.Process(Encoding.ASCII.GetByte s(report.Value), setting.RecipientType.ToString("f"), String.Empty);
break;
default:
content = Processor.Process(Encoding.UTF8.GetBytes (report.Value), filename, DateTime.Now, setting.data);
break;
}
guest 12.07.2013 19:41 # −6