private InterfaceMethod(InterfaceMethod imToCopyFrom) : base(null) { imToCopyFrom.CloneInto(this); returnType = imToCopyFrom.returnType.Clone(); hasNewKeyword = imToCopyFrom.hasNewKeyword; foreach (Parameter p in imToCopyFrom.Parameters) { Parameters.Add((Parameter)p.Clone()); } }
protected override bool CustomMergeStepParameterInternal(BaseConstruct user, BaseConstruct newgen, BaseConstruct prevgen) { InterfaceMethod userBC = (InterfaceMethod)user, newgenBC = (InterfaceMethod)newgen, prevgenBC = (InterfaceMethod)prevgen; // Return Type if (!Utility.MergeDataType(ref returnType, userBC.returnType, newgenBC.returnType, prevgenBC.returnType)) { return(false); } // HasNewKeyword if (!Utility.MergeSingleItem(ref hasNewKeyword, userBC.HasNewKeyword, newgenBC.HasNewKeyword, prevgenBC.HasNewKeyword)) { return(false); } return(true); }
private bool IsTheSame(InterfaceMethod comparisonFunction, ComparisonDepth depth) { if (comparisonFunction == null) { return(false); } if (Name == comparisonFunction.Name) { if (ParametersAreTheSame(comparisonFunction, depth) == false) { return(false); } // Function names are the same, so now compare the class names Interface thisParentClass = (Interface)ParentObject; Interface comparisonParentClass = (Interface)comparisonFunction.ParentObject; if (thisParentClass.IsTheSame(comparisonParentClass)) { if (depth == ComparisonDepth.Signature) { return(true); } if (returnType != comparisonFunction.returnType) { return(false); } if (hasNewKeyword != comparisonFunction.hasNewKeyword) { ComparisonDifference += GetType().Name + ".HasNewKeyword"; return(false); } if (!base.IsTheSame(comparisonFunction, depth)) { return(false); } return(true); } } return(false); }
private bool IsTheSame(InterfaceMethod comparisonFunction) { return(IsTheSame(comparisonFunction, ComparisonDepth.Signature)); }