public bool IsSetToImplicitDefault(IObjectFacade objectFacade)
        {
            // return true if it's scalar and and still set to its implicit default value (eg 0 for an int)
            if (!DefaultTypeIsExplicit(objectFacade) && WrappedSpec.ReturnSpec.IsParseable)
            {
                var dflt         = WrappedSpec.GetDefault(objectFacade.WrappedAdapter());
                var currentValue = GetValue(objectFacade);

                return(dflt?.Object == currentValue?.Object);
            }

            return(false);
        }
Exemple #2
0
 public IObjectFacade GetDefault(IObjectFacade objectFacade)
 {
     return(ObjectFacade.Wrap(WrappedSpec.GetDefault(((ObjectFacade)objectFacade).WrappedNakedObject), FrameworkFacade, framework));
 }