コード例 #1
0
        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();
        }
コード例 #3
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();
 }