private InterfaceEvent(InterfaceEvent eventToCopyFrom)
     : base(null)
 {
     eventToCopyFrom.CloneInto(this);
     if (eventToCopyFrom.DataType != null)
     {
         DataType = eventToCopyFrom.DataType.Clone();
     }
     HasNewKeyword = eventToCopyFrom.HasNewKeyword;
 }
        protected override bool CustomMergeStepInternal(BaseConstruct user, BaseConstruct newgen, BaseConstruct prevgen)
        {
            InterfaceEvent userBC = (InterfaceEvent)user, newgenBC = (InterfaceEvent)newgen, prevgenBC = (InterfaceEvent)prevgen;

            // DataType
            if (!Utility.MergeDataType(ref DataType, userBC.DataType, newgenBC.DataType, prevgenBC.DataType))
            {
                return(false);
            }
            // HasNewKeyword
            if (!Utility.MergeSingleItem(ref HasNewKeyword, userBC.HasNewKeyword, newgenBC.HasNewKeyword, prevgenBC.HasNewKeyword))
            {
                return(false);
            }

            return(true);
        }
        private bool IsTheSame(InterfaceEvent comparisonEvent, ComparisonDepth depth)
        {
            if (comparisonEvent == null)
            {
                return(false);
            }

            if (Name == comparisonEvent.Name)
            {
                // Function names are the same, so now compare the class names
                // TODO: Parent Comparison
                //if (ParentObject.IsTheSame(comparisonEvent.ParentObject))
                {
                    if (depth == ComparisonDepth.Signature)
                    {
                        return(true);
                    }

                    if (DataType != comparisonEvent.DataType)
                    {
                        return(false);
                    }

                    if (HasNewKeyword != comparisonEvent.HasNewKeyword)
                    {
                        ComparisonDifference += GetType().Name + ".HasNewKeyword";
                        return(false);
                    }
                    if (!base.IsTheSame(comparisonEvent, depth))
                    {
                        return(false);
                    }
                    return(true);
                }
            }
            return(false);
        }
 private bool IsTheSame(InterfaceEvent comparisonEvent)
 {
     return(IsTheSame(comparisonEvent, ComparisonDepth.Signature));
 }