public bool Equals(ObjectFacade other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Equals(other.WrappedNakedObject, WrappedNakedObject));
 }
 public bool Equals(ObjectFacade other) {
     if (ReferenceEquals(null, other)) { return false; }
     if (ReferenceEquals(this, other)) { return true; }
     return Equals(other.WrappedNakedObject, WrappedNakedObject);
 }
Beispiel #3
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());
        }
Beispiel #4
0
 public IObjectFacade GetDefault(IObjectFacade objectFacade)
 {
     return(ObjectFacade.Wrap(WrappedSpec.GetDefault(((ObjectFacade)objectFacade).WrappedNakedObject), FrameworkFacade, framework));
 }
Beispiel #5
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());
 }
Beispiel #6
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);
        }
Beispiel #7
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);
        }
Beispiel #8
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));
 }