Skip to content

Minor feature and bug fixes #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/DtaSpy/IO/Context/BizTalkContextReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ private decimal ReadDecimal()
// or not. We need more data on this. If you end up here it'd be swell if you could provide some sample
// data with more complex decimals.

return decimal.Parse(ReadLengthPrefixedString(), NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture);
string s = ReadLengthPrefixedString().Replace(",", ".");
return decimal.Parse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture);
}

private bool ReadBoolean()
Expand Down
18 changes: 13 additions & 5 deletions src/DtaSpy/IO/MessagePart/BizTalkMessagePartStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,24 @@ public override bool CanWrite
/// </summary>
/// <exception cref="T:System.NotSupportedException">A class derived from Stream does not support seeking.</exception>
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed.</exception>
public override long Length { get { throw new NotSupportedException(); } }

public override long Length
{
get
{
return innerStream.Length; // throw new NotSupportedException();
}
}
/// <summary>
/// Gets or sets the position within the current stream. Not supported by BizTalkFragmentStream.
/// </summary>
/// <exception cref="T:System.NotSupportedException">The stream does not support seeking.</exception>
public override long Position
{
get { throw new NotSupportedException(); }
set { throw new NotSupportedException(); }
get { return innerStream.Position; }
set
{
innerStream.Position = value;// throw new NotSupportedException();
}
}

/// <summary>
Expand Down Expand Up @@ -206,7 +214,7 @@ public override void Flush()

public override long Seek(long offset, SeekOrigin origin)
{
throw new NotSupportedException("Seek not supported");
return innerStream.Seek(0, SeekOrigin.Begin);
}

public override void SetLength(long value)
Expand Down