private object CreateObject(ITypeSpec spec) { Log.DebugFormat("CreateObject: " + spec); Type type = TypeUtils.GetType(spec.FullName); if (spec.IsViewModel) { object viewModel = Activator.CreateInstance(type); InitDomainObject(viewModel); return(viewModel); } return(objectPersistor.CreateObject(spec)); }
private object CreateObject(ITypeSpec spec) { Type type = TypeUtils.GetType(spec.FullName); return(spec.IsViewModel || spec is IServiceSpec || spec.ContainsFacet <INotPersistedFacet>() ? CreateNotPersistedObject(type, spec is IServiceSpec) : objectPersistor.CreateObject(spec)); }