Пример #1
0
        private Task WriteGroupElements(IMessageChannel channel, IReadOnlyList <BigInteger> groupElements)
        {
            MessageComposer message = new MessageComposer(2 * groupElements.Count);

            foreach (BigInteger groupElement in groupElements)
            {
                byte[] packedGroupElement = groupElement.ToByteArray();
                message.Write(packedGroupElement.Length);
                message.Write(packedGroupElement);
            }

            return(channel.WriteMessageAsync(message.Compose()));
        }
Пример #2
0
        private Task WriteOptions(IMessageChannel channel, byte[][][] options, int numberOfOptions, int numberOfInvocations, int numberOfMessageBytes)
        {
            MessageComposer message = new MessageComposer(numberOfOptions * numberOfInvocations);

            for (int j = 0; j < numberOfInvocations; ++j)
            {
                for (int i = 0; i < numberOfOptions; ++i)
                {
                    message.Write(options[j][i]);
                }
            }

            return(channel.WriteMessageAsync(message.Compose()));
        }
Пример #3
0
 public byte[] Create()
 {
     return(_composer.Compose());
 }