Commit ff65c941 by Alex Nasyr

tr

parent 37f11ea0
...@@ -41,9 +41,9 @@ namespace SocialMinistryDataExchange.Model { ...@@ -41,9 +41,9 @@ namespace SocialMinistryDataExchange.Model {
foreach (var psa in Enum.GetValues(typeof(PersonSearchAttributes))) { foreach (var psa in Enum.GetValues(typeof(PersonSearchAttributes))) {
x = Person.Person.GetType().GetProperty(psa.ToString()).GetValue(Person.Person) is null ? x : (x | (byte)psa); x = Person.Person.GetType().GetProperty(psa.ToString()).GetValue(Person.Person) is null ? x : (x | (byte)psa);
} }
var z = (PersonSearchAttributes)x; //var z = (PersonSearchAttributes)x;
if (x < Enum.GetValues(typeof(PersonSearchAttributes)).Cast<byte>().Sum(s => s)) { if (x < Enum.GetValues(typeof(PersonSearchAttributes)).Cast<byte>().Sum(s => s)) {
Person.Person.Error = $"Parameters: [{(PersonSearchAttributes)(Enum.GetValues(typeof(PersonSearchAttributes)).Cast<byte>().Sum(s => s) - (int)z)}] can't be null; "; Person.Person.Error = $"Parameters: [{(PersonSearchAttributes)(Enum.GetValues(typeof(PersonSearchAttributes)).Cast<byte>().Sum(s => s) - x)}] can't be null; ";
_logger.Error($"MsgID '{{@MsgID}}': {{@Error}};", Responce.MsgID, Person.Person.Error); _logger.Error($"MsgID '{{@MsgID}}': {{@Error}};", Responce.MsgID, Person.Person.Error);
} }
else { else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment