public VariableContainer(string @namespace, string name, T value, bool readOnly) { m_namespace = @namespace; m_name = name; m_value = value; m_readonly = readOnly; m_uniqueID = VariableContainer.GetIdentifier(); }
private bool disposedValue = false; // To detect redundant calls protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { this.Disposing?.Invoke(this, EventArgs.Empty); m_container.Dispose(); m_container = null; } // TODO: set large fields to null. this.Disposed?.Invoke(this, EventArgs.Empty); disposedValue = true; } }
public OwnerAccessor(VariableContainer <T> container) { m_container = container; }
public static IValueContainerOwnerAccess Create(string @namespace, string name, T value, bool readOnly) { var container = new VariableContainer <T>(@namespace, name, value, readOnly); return(new OwnerAccessor(container)); }