public void SavingDefaultInheritanceExportsAllProperties()
 {
     var inheritanceDestination = new ConnectionInfoInheritance(new object(), true);
     DefaultConnectionInheritance.Instance.AutomaticResize = true;
     DefaultConnectionInheritance.Instance.SaveTo(inheritanceDestination);
     Assert.That(inheritanceDestination.AutomaticResize, Is.True);
 }
 public void LoadingDefaultInheritanceUpdatesAllProperties()
 {
     var inheritanceSource = new ConnectionInfoInheritance(new object(), true);
     inheritanceSource.TurnOnInheritanceCompletely();
     DefaultConnectionInheritance.Instance.LoadFrom(inheritanceSource);
     Assert.That(DefaultConnectionInheritance.Instance.EverythingInherited, Is.True);
 }
Esempio n. 3
0
        protected void SetAllValues(ConnectionInfoInheritance otherInheritanceObject)
        {
            var properties = GetProperties();

            foreach (var property in properties)
            {
                var newPropertyValue = property.GetValue(otherInheritanceObject, null);
                property.SetValue(this, newPropertyValue, null);
            }
        }
Esempio n. 4
0
 private void SetNonBrowsablePropertiesDefaults()
 {
     _Inheritance     = new ConnectionInfoInheritance(this);
     _OpenConnections = new ProtocolList();
     _IsContainer     = false;
     _IsDefault       = false;
     _PositionID      = 0;
     _IsQuickConnect  = false;
     _PleaseConnect   = false;
 }
        private void SetAllValues(ConnectionInfoInheritance otherInheritanceObject)
        {
            var properties = typeof(ConnectionInfoInheritance).GetProperties();

            foreach (var property in properties)
            {
                if (property.Name != "EverythingInherited")
                {
                    var newPropertyValue = property.GetValue(otherInheritanceObject, null);
                    property.SetValue(this, newPropertyValue, null);
                }
            }
        }
Esempio n. 6
0
 private void StashInheritanceData()
 {
     _tempInheritanceStorage = Copy();
 }
Esempio n. 7
0
 private void UnstashInheritanceData()
 {
     SetAllValues(_tempInheritanceStorage);
     _tempInheritanceStorage = null;
 }
Esempio n. 8
0
 private void StashInheritanceData()
 {
     _tempInheritanceStorage = Clone(Parent);
 }
Esempio n. 9
0
 private void SetNonBrowsablePropertiesDefaults()
 {
     Inheritance = new ConnectionInfoInheritance(this);
     SetNewOpenConnectionList();
     //PositionID = 0;
 }
 private void SetAllValues(ConnectionInfoInheritance otherInheritanceObject)
 {
     var properties = GetProperties();
     foreach (var property in properties)
     {
         var newPropertyValue = property.GetValue(otherInheritanceObject, null);
         property.SetValue(this, newPropertyValue, null);
     }
 }
 public void NewInheritanceInstancesCreatedWithAllDefaultInheritanceValues()
 {
     DefaultConnectionInheritance.Instance.TurnOnInheritanceCompletely();
     var inheritanceInstance = new ConnectionInfoInheritance(new object());
     Assert.That(inheritanceInstance.EverythingInherited, Is.True);
 }
Esempio n. 12
0
 private void SetNonBrowsablePropertiesDefaults()
 {
     Inheritance     = new ConnectionInfoInheritance(this);
     OpenConnections = new ProtocolList();
     PositionID      = 0;
 }
 private void UnstashInheritanceData()
 {
     SetAllValues(_tempInheritanceStorage);
     _tempInheritanceStorage = null;
 }
 private void StashInheritanceData()
 {
     _tempInheritanceStorage = Clone();
 }
 public void Setup()
 {
     _connectionInfo = new ConnectionInfo();
     _inheritance = new ConnectionInfoInheritance(_connectionInfo);
 }
 public void Teardown()
 {
     _connectionInfo = null;
     _inheritance = null;
 }
 public void NewInheritanceInstancesCreatedWithDefaultInheritanceValues()
 {
     DefaultConnectionInheritance.Instance.Domain = true;
     var inheritanceInstance = new ConnectionInfoInheritance(new object());
     Assert.That(inheritanceInstance.Domain, Is.True);
 }