public IObjectFacade[] GetChoices(IObjectFacade objectFacade, IDictionary <string, object> parameterNameValues)
        {
            var otherParms = parameterNameValues == null ? null : parameterNameValues.Select(kvp => new { kvp.Key, kvp.Value, parm = Action.Parameters.Single(p => p.Id == kvp.Key) });

            var pnv = otherParms == null ? null : otherParms.ToDictionary(a => a.Key, a => SafeGetValue(a.parm, a.Value));

            return(nakedObjectActionParameter.GetChoices(((ObjectFacade)objectFacade).WrappedNakedObject, pnv).Select(no => ObjectFacade.Wrap(no, FrameworkFacade, framework)).Cast <IObjectFacade>().ToArray());
        }
 public INakedObjectSurface[] GetChoices(INakedObjectSurface nakedObject, IDictionary <string, INakedObjectSurface> parameterNameValues)
 {
     return(nakedObjectActionParameter.GetChoices(((NakedObjectWrapper)nakedObject).WrappedNakedObject, null).Select(no => NakedObjectWrapper.Wrap(no, Surface, framework)).Cast <INakedObjectSurface>().ToArray());
 }
Exemple #3
0
 public ITestNaked[] GetChoices()
 {
     return(parameterSpec.GetChoices(NakedObject, null).Select(x => factory.CreateTestNaked(x)).ToArray());
 }