private bool IsTheSame(InterfaceIndexer comparisonIndexer, ComparisonDepth depth) { if (comparisonIndexer == null) { return(false); } if (Name == comparisonIndexer.Name) { if (ParametersAreTheSame(comparisonIndexer, depth) == false) { return(false); } // Function names are the same, so now compare the class names if (ParentObject.IsTheSame(comparisonIndexer.ParentObject)) { if (depth == ComparisonDepth.Signature) { return(true); } if (dataType != comparisonIndexer.dataType) { return(false); } if (hasNewKeyword != comparisonIndexer.hasNewKeyword) { ComparisonDifference += GetType().Name + ".HasNewKeyword"; return(false); } if (depth == ComparisonDepth.Outer) { return(true); } if (!base.IsTheSame(comparisonIndexer, depth)) { return(false); } if (!GetAccessor.IsTheSame(comparisonIndexer.GetAccessor)) { ComparisonDifference += GetType().Name + ".GetAccessor"; return(false); } if (!SetAccessor.IsTheSame(comparisonIndexer.SetAccessor)) { ComparisonDifference += GetType().Name + ".SetAccessor"; return(false); } return(true); } } return(false); }
private InterfaceIndexer(InterfaceIndexer iiToCopyFrom) : base(null) { iiToCopyFrom.CloneInto(this); if (iiToCopyFrom.dataType != null) { dataType = iiToCopyFrom.dataType.Clone(); } hasNewKeyword = iiToCopyFrom.hasNewKeyword; foreach (Parameter p in iiToCopyFrom.Parameters) { Parameters.Add((Parameter)p.Clone()); } }
protected override bool CustomMergeStepParameterInternal(BaseConstruct user, BaseConstruct newgen, BaseConstruct prevgen) { InterfaceIndexer userBC = (InterfaceIndexer)user, newgenBC = (InterfaceIndexer)newgen, prevgenBC = (InterfaceIndexer)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(InterfaceIndexer comparisonFunction) { return(IsTheSame(comparisonFunction, ComparisonDepth.Signature)); }