public ListContextSurface ToListContextSurface(INakedObjectsSurface surface, INakedObjectsFramework framework) { return(new ListContextSurface { ElementType = new NakedObjectSpecificationWrapper(ElementType, surface, framework), List = List.Select(no => NakedObjectWrapper.Wrap(no, surface, framework)).Cast <INakedObjectSurface>().ToArray(), IsListOfServices = IsListOfServices }); }
protected T ToContextSurface <T>(T context, INakedObjectsSurface surface, INakedObjectsFramework framework) where T : ContextSurface { context.Target = NakedObjectWrapper.Wrap(Target, surface, framework); context.Reason = Reason; context.ErrorCause = ErrorCause; context.ProposedNakedObject = NakedObjectWrapper.Wrap(ProposedNakedObject, surface, framework); context.ProposedValue = ProposedValue; return(context); }