дополнение в передаваемый объект

This commit is contained in:
2025-02-13 15:43:34 +03:00
parent 3fb0a525fa
commit 59c77bc9df
+7 -1
View File
@@ -21,7 +21,13 @@ public class SharedObject<T> where T : notnull
"DefaultContextRepository was not defined"); "DefaultContextRepository was not defined");
private int _contextId = -1; private int _contextId = -1;
public int OwnerId => TransmissionConfig.OwnershipRepository!.GetOwnershipId(); private int _ownerId = -1;
public int OwnerId
{
get => _ownerId == -1 ? TransmissionConfig.OwnershipRepository!.GetOwnershipId() : _ownerId;
set => _ownerId = value;
}
// ReSharper disable once MemberCanBePrivate.Global // ReSharper disable once MemberCanBePrivate.Global
public int ContextId public int ContextId