示例#1
0
 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();
 }
示例#2
0
            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;
                }
            }
示例#3
0
 public OwnerAccessor(VariableContainer <T> container)
 {
     m_container = container;
 }
示例#4
0
        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));
        }