public static Func <CoapPacketRecord, string> GetModelKeyFunc(Fields modelKey)
 {
     return(p =>
     {
         var cra = new CoapResourceAccess(p.CoapCode, p.CoapType, p.CoapUriPath);
         return $"{(modelKey.HasFlag(Fields.CoapCode) ? "*" : cra.CoapCodeString)}"
         + $"[{(modelKey.HasFlag(Fields.CoapType) ? "*" : cra.CoapTypeString)}]"
         + $"{(modelKey.HasFlag(Fields.CoapUriPath) ? "*" : cra.CoapUriPath)}";
     });
 }
Example #2
0
 public override Func <IPacketRecord, string> GetModelKeyFunc(Enum modelKey)
 {
     return(x => CoapResourceAccess.GetModelKeyFunc((CoapResourceAccess.Fields)modelKey)((CoapPacketRecord)x));
 }