private void InitializeNewObject(INakedObjectAdapter nakedObjectAdapter, object rootObject)
        {
            var spec = nakedObjectAdapter.Spec as IObjectSpec ?? throw new NakedObjectSystemException("nakedObjectAdapter.Spec must be IObjectSpec");

            spec.Properties.ForEach(field => field.ToDefault(nakedObjectAdapter));
            CreateInlineObjects(nakedObjectAdapter, rootObject);
            nakedObjectAdapter.Created();
        }
Пример #2
0
        private void InitializeNewObject(INakedObjectAdapter nakedObjectAdapter, object rootObject)
        {
            var spec = nakedObjectAdapter.Spec as IObjectSpec;

            Trace.Assert(spec != null);
            spec.Properties.ForEach(field => field.ToDefault(nakedObjectAdapter));
            CreateInlineObjects(nakedObjectAdapter, rootObject);
            nakedObjectAdapter.Created();
        }
 private void InitializeNewObject(INakedObjectAdapter nakedObjectAdapter, object rootObject) {
     var spec = nakedObjectAdapter.Spec as IObjectSpec;
     Trace.Assert(spec != null);
     spec.Properties.ForEach(field => field.ToDefault(nakedObjectAdapter));
     CreateInlineObjects(nakedObjectAdapter, rootObject);
     nakedObjectAdapter.Created();
 }