예제 #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));
        }