public bool Equals(IBusinessModel other)
        {
            try
            {
                var thisType   = GetType();
                var otherType  = other.GetType();
                var properties = thisType.GetProperties();
                foreach (var property in properties)
                {
                    if (IsMethodWithoutArgument(property))
                    {
                        var otherProperty = otherType.GetProperty(property.Name);
                        if (otherProperty == null)
                        {
                            return(false);
                        }

                        var thisValue  = property.GetValue(this, null);
                        var otherValue = otherProperty.GetValue(other, null);
                        if (!thisValue.Equals(otherValue))
                        {
                            return(false);
                        }
                    }
                }
            }
            catch (Exception)
            {
                return(false);
            }
            return(true);
        }
        public bool Equals(IBusinessModel other)
        {
            try
            {
                var thisType = GetType();
                var otherType = other.GetType();
                var properties = thisType.GetProperties();
                foreach (var property in properties)
                {
                    if (IsMethodWithoutArgument(property))
                    {
                        var otherProperty = otherType.GetProperty(property.Name);
                        if (otherProperty == null)
                            return false;

                        var thisValue = property.GetValue(this, null);
                        var otherValue = otherProperty.GetValue(other, null);
                        if (!thisValue.Equals(otherValue))
                            return false;
                    }
                }
            }
            catch (Exception)
            {
                return false;
            }
            return true;
        }
            public bool Equals(IBusinessModel other)
            {
                if (other == null)
                {
                    return(false);
                }
                if (!(other is IFeatureTypeInfo))
                {
                    return(false);
                }

                return(IsNull());
            }
 private void SetBusinessModel(IBusinessModel i_model)
 {
     mBusinessModel = i_model;
 }
 public PresentationModel(IBusinessModel i_businessModel)
 {
     ViewModel = new ViewModel();
     SetBusinessModel(i_businessModel);
     SubscribeToBusinessModelUpdate(true);
 }
            public bool Equals(IBusinessModel other)
            {
                if (other == null)
                    return false;
                if (!(other is IFeatureTypeInfo))
                    return false;

                return IsNull();
            }
Exemple #7
0
 public DescendantEntity(IBusinessModel model, IAppContext context, ...additional params...)