示例#1
0
        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());
        }
示例#2
0
 public IObjectFacade[] GetCompletions(IObjectFacade objectFacade, string autoCompleteParm)
 {
     return(WrappedSpec.GetCompletions(((ObjectFacade)objectFacade).WrappedNakedObject, autoCompleteParm).Select(no => ObjectFacade.Wrap(no, FrameworkFacade, framework)).Cast <IObjectFacade>().ToArray());
 }
示例#3
0
 public IObjectFacade GetDefault(IObjectFacade objectFacade)
 {
     return(ObjectFacade.Wrap(WrappedSpec.GetDefault(((ObjectFacade)objectFacade).WrappedNakedObject), FrameworkFacade, framework));
 }
示例#4
0
        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);
        }
示例#5
0
        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);
        }
示例#6
0
        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));
 }