Open LSViana opened 1 year ago
@LSViana We have this TODO in the code:
// TODO This is a temporary solution to track the amount of transactions a document has open.
// It's fragile because a cloned instance of the same document won't be synchronized and if a `Transaction`
// is opened in the cloned instance, it'll receive `null` from the Rust side and will cause the
// `ThrowHelper.PendingTransaction()` to run (which is acceptable since it's a managed exception).
internal void NotifyTransactionStarted()
{
openTransactions++;
}
internal void NotifyTransactionClosed()
{
openTransactions--;
}
Do you think we will ever have a final solution or shall we just remove this and also close this issue?
@SebastianStehle I think we'll have some solutions if we ever look into that in detail but I didn't do it yet.
Given that, I'd just leave it there. It's not harmful and informs other developers who read the same code which is a positive detail.
This list is not final and will be accumulated as items are solved:
OutputNative
size with pointer size inMapEntryNative
*Native
counterpart for event classes that don't need itXmlElement.Observe()
that weren't using a root-levelXmlElement
but should beXmlElement.Unobserve()
that weren't using a root-levelXmlElement
but should beXmlElement.Parent()
that weren't returning the correct valueXmlElement.String()
that weren't testing for childXmlText
nodes but should beTransaction.Dispose()
Output.Object
Map.Length()
TextChannel
Doc.Guid
that will not be fixed because the GUID format isn't compatible with C#InputNative
because the size of the data can't be reduced or data will be lostOutput
to supportnull
pointernew Output()
to useReferenceAccessor.Access(Output)
NotImplemented
withNotSupported
exception on theEventBranch
constructor since all cases are now covered[Ignore]
because they were waiting for implementationsIEnumerator<T>.Reset()
on the following classes:ArrayEnumerator
MapEnumerator
XmlAttributeEnumerator
XmlTreeWalkerEnumerator
XmlElement
with anXmlFragment
before returning the value.XmlText
with anXmlFragment
before returning the value.EventSubscription
withUnsubscribe()
.