public override int GetHashCode() { var result = Name.GetHashCode(); if (Alias != null) { result ^= Alias.GetHashCode(); } if (Arguments != null) { result = Arguments.Aggregate(result, (x, y) => x ^ y.GetHashCode()); } if (Directives != null) { result = Directives.Aggregate(result, (x, y) => x ^ y.GetHashCode()); } if (SelectionSet != null) { result = SelectionSet.Aggregate(result, (x, y) => x ^ y.GetHashCode()); } return(result); }
public override int GetHashCode() { unchecked { var hashCode = base.GetHashCode(); hashCode = (hashCode * 397) ^ (Return != null ? Return.GetHashCode() : 0); return(Arguments.Aggregate(hashCode, (current, arg) => (current * 397) ^ (arg != null ? arg.GetHashCode() : 0))); } }
public override string ToString() { var argumentStr = Arguments.Aggregate(string.Empty, (a, b) => a.ToString() + ", " + b.ToString()); if (argumentStr.Length > 0) { argumentStr = argumentStr.Substring(1).Trim(); } return(Name + "( " + argumentStr + (argumentStr.Length == 0 ? "" : " ") + ((ReturnType == null || string.IsNullOrEmpty(ReturnType.Type)) ? ")" : (") : " + ReturnType.Type))); }
private string CreateArguments() { var returnValue = ""; if (Arguments == null) { return(returnValue); } returnValue = Arguments.Aggregate(returnValue, (current, argument) => current + (" " + argument.Key + ": " + argument.Value)); return(string.Format("{{{0}}}", returnValue)); }
public override string ToString() { return("call " + FunctionName + " with args " + Arguments.Aggregate("", (acc, item) => acc + item + ",")); }
public override string ToString() { return("Declare " + MethodName + " ret: " + MethodReturnType + ", args " + Arguments.Aggregate("", (a, b) => a + b + ",") + " with body " + Body.ScopedStatements.Aggregate("", (acc, item) => acc + item + ",")); }