You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And this generated code is causing an error because there is no GetBuffer() method on the Stream.
Severity Code Description Project File Line
Error CS1061 'MemoryStream' does not contain a definition for 'GetBuffer' and no extension method 'GetBuffer' accepting a first argument of type 'MemoryStream' could be found (are you missing a using directive or an assembly reference?) libaxolotl-csharp C:\Users\Jeff\Source\Repos\libaxolotl-windows\libaxolotl-csharp\Protobuf\LocalStorageProtocol.Serializer.cs 393
On the surface, the fix seems to be the use of CopyTo() instead of GetBuffer(), although I am still testing this change to be sure.
Example:
msField.CopyTo(stream, (int)length6);
The text was updated successfully, but these errors were encountered:
WriteTo is available. It takes a stream just like your documentation link
shows. In general, it seems that if a method is available on .NET 4.6 and a
method is also available for Portable Class Libraries, it should compile in
my environment.
I was using the proto found here:
https://github.com/WhisperSystems/libaxolotl-java/blob/master/protobuf/LocalStorageProtocol.proto
And this generated code is causing an error because there is no GetBuffer() method on the Stream.
Severity Code Description Project File Line
Error CS1061 'MemoryStream' does not contain a definition for 'GetBuffer' and no extension method 'GetBuffer' accepting a first argument of type 'MemoryStream' could be found (are you missing a using directive or an assembly reference?) libaxolotl-csharp C:\Users\Jeff\Source\Repos\libaxolotl-windows\libaxolotl-csharp\Protobuf\LocalStorageProtocol.Serializer.cs 393
if (instance.SenderChain != null)
{
// Key for field: 6, LengthDelimited
stream.WriteByte(50);
msField.SetLength(0);
Textsecure.SessionStructure.Chain.Serialize(msField, instance.SenderChain);
// Length delimited byte array
uint length6 = (uint)msField.Length;
global::SilentOrbit.ProtocolBuffers.ProtocolParser.WriteUInt32(stream, length6);
stream.Write(msField.GetBuffer(), 0, (int)length6);
On the surface, the fix seems to be the use of CopyTo() instead of GetBuffer(), although I am still testing this change to be sure.
Example:
msField.CopyTo(stream, (int)length6);
The text was updated successfully, but these errors were encountered: