public GoSDKTypedData(GoSDKInvocation invocation, string path, GoSDKTypeChain type, IVariable variable = null) { Debug.Assert(invocation != null); Debug.Assert(!string.IsNullOrEmpty(path) && type != null); Invocation = invocation; PropertyPath = path; Name = path.ExtractLastPath(); GoType = type; OriginalVariable = variable; }
private GoSDKTypedData Clone(GoSDKInvocation invocation, string path, IModelType type, IEnumerable <Regex> excludes, IVariable variable = null) { var goData = new GoSDKTypedData(invocation, path, new GoSDKTypeChain(type), variable); if (goData.GoType.Terminal == GoSDKTerminalTypes.Complex) { var children = from p in ((CompositeType)goData.GoType.OriginalTerminalType).ComposedProperties let subpath = p.ToPathString(path) where excludes.All(x => !x.IsMatch(subpath)) select Clone(invocation, subpath, p.ModelType, excludes, p); goData.AddProperties(children); } return(goData); }
private static void AppendDisplayString(this GoSDKInvocation invocation, IndentedStringBuilder builder) { builder.AppendLine("{0} invocation \"{1}\"", invocation.Category, invocation.MethodName); invocation.ArgumentsRoot.AppendDisplayString(builder, false); invocation.ResponsesRoot.AppendDisplayString(builder, true); }