public static Request ToRequest(string uuid, ushort man, ushort beaconId, BeaconEventType type) { return(new Request(new BeaconEventArgs() { Beacon = new Beacon() { Id1 = uuid, Id2 = man, Id3 = beaconId }, EventType = type }, SdkData.NextId())); }
public async Task <int> CreateRequest(BeaconEventArgs beaconEventArgs) { int requestId = SdkData.NextId(); Logger.Debug("Resolver: Beacon " + beaconEventArgs.Beacon.Id1 + " " + beaconEventArgs.Beacon.Id2 + " " + beaconEventArgs.Beacon.Id3 + " ---> Request: " + requestId); Request request = new Request(beaconEventArgs, requestId); if (SynchronResolver) { await Resolve(request); Finished?.Invoke(); } else { AddAsynchronRequest(request); } return(requestId); }