public async Task SendBinary(
     byte[] data,
     OpcodeKind opcode,
     FragmentKind fragment, CancellationToken ct) =>
 await ComposeFrameAndSendAsync(
     data,
     opcode,
     fragment,
     ct);
 public async Task SendText(
     string message,
     OpcodeKind opcode,
     FragmentKind fragment,
     CancellationToken ct = default) =>
 await ComposeFrameAndSendAsync(
     message,
     opcode,
     fragment,
     ct);
Example #3
0
 public Fragment(
     string name,
     FragmentKind kind,
     INamedType typeCondition,
     SelectionSetNode selectionSet)
 {
     Name          = name;
     Kind          = kind;
     TypeCondition = typeCondition ?? throw new ArgumentNullException(nameof(typeCondition));
     SelectionSet  = selectionSet ?? throw new ArgumentNullException(nameof(selectionSet));
 }
Example #4
0
 public Fragment(
     string name,
     FragmentKind kind,
     INamedType typeCondition,
     SelectionSetNode selectionSet)
 {
     Name          = name;
     Kind          = kind;
     TypeCondition = typeCondition;
     SelectionSet  = selectionSet;
 }
 private async Task ComposeFrameAndSendAsync(
     string?message,
     OpcodeKind opcode,
     FragmentKind fragment,
     CancellationToken ct) =>
 await ComposeFrameAndSendAsync(