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(WrappedSpec.GetChoices(((ObjectFacade)objectFacade).WrappedNakedObject, pnv).Select(no => ObjectFacade.Wrap(no, FrameworkFacade, framework)).Cast <IObjectFacade>().ToArray()); }
public IObjectFacade[] GetCompletions(IObjectFacade objectFacade, string autoCompleteParm) { return(WrappedSpec.GetCompletions(((ObjectFacade)objectFacade).WrappedNakedObject, autoCompleteParm).Select(no => ObjectFacade.Wrap(no, FrameworkFacade, framework)).Cast <IObjectFacade>().ToArray()); }
public IObjectFacade GetDefault(IObjectFacade objectFacade) { return(ObjectFacade.Wrap(WrappedSpec.GetDefault(((ObjectFacade)objectFacade).WrappedNakedObject), FrameworkFacade, framework)); }
public IObjectFacade[] GetCompletions(IObjectFacade target, string autoCompleteParm) { var oneToOneFeature = assoc as IOneToOneFeatureSpec; return(oneToOneFeature != null?oneToOneFeature.GetCompletions(((ObjectFacade)target).WrappedNakedObject, autoCompleteParm).Select(no => ObjectFacade.Wrap(no, FrameworkFacade, framework)).Cast <IObjectFacade>().ToArray() : null); }
public IObjectFacade[] GetChoices(IObjectFacade target, IDictionary <string, object> parameterNameValues) { var oneToOneFeature = assoc as IOneToOneFeatureSpec; var pnv = parameterNameValues == null ? null : parameterNameValues.ToDictionary(kvp => kvp.Key, kvp => framework.GetNakedObject(kvp.Value)); return(oneToOneFeature != null?oneToOneFeature.GetChoices(((ObjectFacade)target).WrappedNakedObject, pnv).Select(no => ObjectFacade.Wrap(no, FrameworkFacade, framework)).Cast <IObjectFacade>().ToArray() : null); }
public IObjectFacade GetValue(IObjectFacade target) { INakedObjectAdapter result = assoc.GetNakedObject(((ObjectFacade)target).WrappedNakedObject); return(ObjectFacade.Wrap(result, FrameworkFacade, framework)); }
public IObjectFacade GetValue(IObjectFacade target) { var result = WrappedSpec.GetNakedObject(((ObjectFacade)target).WrappedNakedObject); return(ObjectFacade.Wrap(result, FrameworkFacade, framework)); }
public IObjectFacade GetDefault(IObjectFacade objectFacade) { return(ObjectFacade.Wrap(nakedObjectActionParameter.GetDefault(((ObjectFacade)objectFacade).WrappedNakedObject), FrameworkFacade, framework)); }