private CollectionMemento(ILifecycleManager lifecycleManager, INakedObjectManager nakedObjectManager, IMetamodelManager metamodel) { Assert.AssertNotNull(lifecycleManager); Assert.AssertNotNull(nakedObjectManager); this.lifecycleManager = lifecycleManager; this.nakedObjectManager = nakedObjectManager; this.metamodel = metamodel; }
public OneToManyAssociationSpec(IMetamodelManager metamodel, IOneToManyAssociationSpecImmutable association, ISession session, ILifecycleManager lifecycleManager, INakedObjectManager manager, IObjectPersistor persistor) : base(metamodel, association, session, lifecycleManager, manager) { this.persistor = persistor; isASet = association.ContainsFacet<IIsASetFacet>(); elementSpec = MetamodelManager.GetSpecification(association.ElementSpec); }
public static void UpdateVersion(this INakedObjectAdapter nakedObjectAdapter, ISession session, INakedObjectManager manager) { object versionObject = nakedObjectAdapter == null ? null : nakedObjectAdapter.GetVersion(manager); if (versionObject != null) { nakedObjectAdapter.OptimisticLock = new ConcurrencyCheckVersion(session.UserName, DateTime.Now, versionObject); Log.DebugFormat("GetObject: Updating Version {0} on {1}", nakedObjectAdapter.Version, nakedObjectAdapter); } }
protected AssociationSpecAbstract(IMetamodelManager metamodel, IAssociationSpecImmutable association, ISession session, ILifecycleManager lifecycleManager, INakedObjectManager manager) : base(association.Identifier.MemberName, association, session, lifecycleManager, metamodel) { Assert.AssertNotNull(manager); this.manager = manager; returnSpec = MetamodelManager.GetSpecification(association.ReturnSpec); }
public RecursivePersistAlgorithm(IObjectPersistor persistor, INakedObjectManager manager) { Assert.AssertNotNull(persistor); Assert.AssertNotNull(manager); this.persistor = persistor; this.manager = manager; }
public TestProperty(IObjectPersistor persistor, IAssociationSpec field, ITestHasActions owningObject, ITestObjectFactory factory, INakedObjectManager manager) { this.persistor = persistor; this.field = field; this.owningObject = owningObject; this.factory = factory; this.manager = manager; }
public static string GetMaskedValue(this ISpecification spec, IObjectFacade objectFacade, INakedObjectManager nakedObjectManager) { if (objectFacade == null) { return null; } var mask = spec.GetFacet<IMaskFacet>(); var no = ((ObjectFacade) objectFacade).WrappedNakedObject; return mask != null ? no.Spec.GetFacet<ITitleFacet>().GetTitleWithMask(mask.Value, no, nakedObjectManager) : no.TitleString(); }
public override INakedObjectAdapter Invoke(INakedObjectAdapter nakedObjectAdapter, INakedObjectAdapter[] parameters, int resultPage, ILifecycleManager lifecycleManager, IMetamodelManager manager, ISession session, INakedObjectManager nakedObjectManager, IMessageBroker messageBroker, ITransactionManager transactionManager) { profileManager.Begin(session, ProfileEvent.ActionInvocation, identifier.MemberName, nakedObjectAdapter, lifecycleManager); try { return underlyingFacet.Invoke(nakedObjectAdapter, parameters, resultPage, lifecycleManager, manager, session, nakedObjectManager, messageBroker, transactionManager); } finally { profileManager.End(session, ProfileEvent.ActionInvocation, identifier.MemberName, nakedObjectAdapter, lifecycleManager); } }
private IEnumerable PageInternal(int page, int size, INakedObjectAdapter collection, INakedObjectManager manager) { int firstIndex = (page - 1)*size; for (int index = firstIndex; index < firstIndex + size; index++) { if (index >= AsEnumerable(collection, manager).Count()) { yield break; } yield return AsCollection(collection)[index]; } }
public CollectionMemento(ILifecycleManager lifecycleManager, INakedObjectManager nakedObjectManager, IMetamodelManager metamodel, INakedObjectAdapter target, IActionSpec actionSpec, INakedObjectAdapter[] parameters) : this(lifecycleManager, nakedObjectManager, metamodel) { Target = target; Action = actionSpec; Parameters = parameters; if (Target.Spec.IsViewModel) { lifecycleManager.PopulateViewModelKeys(Target); } }
public ServicesManager(IDomainObjectInjector injector, INakedObjectManager manager, IReflectorConfiguration config) { Assert.AssertNotNull(injector); Assert.AssertNotNull(manager); Assert.AssertNotNull(config); this.injector = injector; this.manager = manager; services = config.Services.Select(Activator.CreateInstance).ToList(); }
public TestObjectFactory(IMetamodelManager metamodelManager, ISession session, ILifecycleManager lifecycleManager, IObjectPersistor persistor, INakedObjectManager manager, ITransactionManager transactionManager, IServicesManager servicesManager, IMessageBroker messageBroker) { this.metamodelManager = metamodelManager; Session = session; this.lifecycleManager = lifecycleManager; this.persistor = persistor; this.manager = manager; this.transactionManager = transactionManager; this.servicesManager = servicesManager; this.messageBroker = messageBroker; }
public CollectionMemento(ILifecycleManager lifecycleManager, INakedObjectManager nakedObjectManager, IMetamodelManager metamodel, CollectionMemento otherMemento, object[] selectedObjects) : this(lifecycleManager, nakedObjectManager, metamodel) { Assert.AssertNotNull(otherMemento); IsPaged = otherMemento.IsPaged; IsNotQueryable = otherMemento.IsNotQueryable; Target = otherMemento.Target; Action = otherMemento.Action; Parameters = otherMemento.Parameters; SelectedObjects = selectedObjects; }
public override string GetTitleWithMask(string mask, INakedObjectAdapter nakedObjectAdapter, INakedObjectManager nakedObjectManager) { if (maskDelegate != null) { return (string) maskDelegate(nakedObjectAdapter.GetDomainObject(), new object[] {mask}); } if (maskMethod != null) { return (string) maskMethod.Invoke(nakedObjectAdapter.GetDomainObject(), new object[] {mask}); } return GetTitle(nakedObjectAdapter, nakedObjectManager); }
public TestAction(IMetamodelManager metamodelManager, ISession session, ILifecycleManager lifecycleManager, ITransactionManager transactionManager, string contributor, IActionSpec actionSpec, ITestHasActions owningObject, ITestObjectFactory factory, INakedObjectManager manager, IMessageBroker messageBroker) { SubMenu = contributor; this.metamodelManager = metamodelManager; this.session = session; this.lifecycleManager = lifecycleManager; this.transactionManager = transactionManager; this.messageBroker = messageBroker; this.owningObject = owningObject; this.factory = factory; this.manager = manager; this.actionSpec = actionSpec; }
// ReSharper disable ParameterHidesMember public void Initialize(IMetamodelManager metamodelManager, ISession session, ILifecycleManager lifecycleManager, IObjectPersistor persistor, INakedObjectManager nakedObjectManager) { // ReSharper restore ParameterHidesMember Assert.AssertNotNull(metamodelManager); Assert.AssertNotNull(session); Assert.AssertNotNull(lifecycleManager); Assert.AssertNotNull(persistor); Assert.AssertNotNull(nakedObjectManager); this.metamodelManager = metamodelManager; this.session = session; this.lifecycleManager = lifecycleManager; this.persistor = persistor; this.nakedObjectManager = nakedObjectManager; isInitialized = true; }
public static string PropertyTitle(this IMemberSpec memberSpec, INakedObjectAdapter nakedObjectAdapter, INakedObjectManager manager) { if (nakedObjectAdapter == null) { return ""; } string text = null; var regex = memberSpec.GetFacet<IRegExFacet>(); if (regex != null) { text = regex.Format(nakedObjectAdapter.TitleString()); } var mask = memberSpec.GetFacet<IMaskFacet>(); if (mask != null) { var title = memberSpec.ReturnSpec.GetFacet<ITitleFacet>(); text = title.GetTitleWithMask(mask.Value, nakedObjectAdapter, manager); } return text ?? nakedObjectAdapter.TitleString(); }
public ActionSpec(SpecFactory memberFactory, IMetamodelManager metamodel, ILifecycleManager lifecycleManager, ISession session, IServicesManager servicesManager, INakedObjectManager nakedObjectManager, IActionSpecImmutable actionSpecImmutable, IMessageBroker messageBroker, ITransactionManager transactionManager) : base(actionSpecImmutable.Identifier.MemberName, actionSpecImmutable, session, lifecycleManager, metamodel) { Assert.AssertNotNull(memberFactory); Assert.AssertNotNull(servicesManager); Assert.AssertNotNull(nakedObjectManager); Assert.AssertNotNull(actionSpecImmutable); this.memberFactory = memberFactory; this.servicesManager = servicesManager; this.nakedObjectManager = nakedObjectManager; this.actionSpecImmutable = actionSpecImmutable; this.messageBroker = messageBroker; this.transactionManager = transactionManager; int index = 0; parametersSpec = this.actionSpecImmutable.Parameters.Select(pp => this.memberFactory.CreateParameter(pp, this, index++)).ToArray(); }
public ActionSpec(SpecFactory memberFactory, IMetamodelManager metamodel, ILifecycleManager lifecycleManager, ISession session, IServicesManager servicesManager, INakedObjectManager nakedObjectManager, IActionSpecImmutable actionSpecImmutable) : base(actionSpecImmutable.Identifier.MemberName, actionSpecImmutable, session, lifecycleManager, metamodel) { Assert.AssertNotNull(memberFactory); Assert.AssertNotNull(servicesManager); Assert.AssertNotNull(nakedObjectManager); Assert.AssertNotNull(actionSpecImmutable); this.memberFactory = memberFactory; this.servicesManager = servicesManager; this.nakedObjectManager = nakedObjectManager; this.actionSpecImmutable = actionSpecImmutable; int index = 0; parametersSpec = this.actionSpecImmutable.Parameters.Select(pp => this.memberFactory.CreateParameter(pp, this, index++)).ToArray(); }
// ReSharper disable ParameterHidesMember public void Initialize(IMetamodelManager metamodelManager, ISession session, ILifecycleManager lifecycleManager, IObjectPersistor persistor, INakedObjectManager nakedObjectManager) { // ReSharper restore ParameterHidesMember Assert.AssertNotNull(metamodelManager); Assert.AssertNotNull(session); Assert.AssertNotNull(lifecycleManager); Assert.AssertNotNull(persistor); Assert.AssertNotNull(nakedObjectManager); this.metamodelManager = metamodelManager; this.session = session; this.lifecycleManager = lifecycleManager; this.persistor = persistor; this.nakedObjectManager = nakedObjectManager; isInitialized = true; }
public static object GetVersion(this INakedObjectAdapter nakedObjectAdapter, INakedObjectManager manager) { IAssociationSpec versionProperty = nakedObjectAdapter.GetVersionProperty(); if (versionProperty != null) { object version = versionProperty.GetNakedObject(nakedObjectAdapter).GetDomainObject(); if (version is DateTime) { return(((DateTime)version).StripMillis()); } return(version); } return(null); }
protected internal ActionParameterSpec(IMetamodelManager metamodel, int number, IActionSpec actionSpec, IActionParameterSpecImmutable actionParameterSpecImmutable, INakedObjectManager manager, ISession session, IObjectPersistor persistor) { Assert.AssertNotNull(metamodel); Assert.AssertNotNull(actionSpec); Assert.AssertNotNull(actionParameterSpecImmutable); Assert.AssertNotNull(manager); Assert.AssertNotNull(session); Assert.AssertNotNull(persistor); this.metamodel = metamodel; this.number = number; parentAction = actionSpec; this.actionParameterSpecImmutable = actionParameterSpecImmutable; this.manager = manager; this.session = session; this.persistor = persistor; }
public CollectionMemento(ILifecycleManager lifecycleManager, INakedObjectManager nakedObjectManager, IMetamodelManager metamodel, string[] strings) : this(lifecycleManager, nakedObjectManager, metamodel) { var helper = new StringDecoderHelper(metamodel, strings, true); // ReSharper disable once UnusedVariable string specName = helper.GetNextString(); string actionId = helper.GetNextString(); var targetOid = (IOid) helper.GetNextEncodedToStrings(); Target = RestoreObject(targetOid); Action = Target.GetActionLeafNode(actionId); var parameters = new List<INakedObjectAdapter>(); while (helper.HasNext) { var parmType = helper.GetNextEnum<ParameterType>(); switch (parmType) { case ParameterType.Value: object obj = helper.GetNextObject(); parameters.Add(nakedObjectManager.CreateAdapter(obj, null, null)); break; case ParameterType.Object: var oid = (IOid) helper.GetNextEncodedToStrings(); INakedObjectAdapter nakedObjectAdapter = RestoreObject(oid); parameters.Add(nakedObjectAdapter); break; case ParameterType.ValueCollection: Type vInstanceType; IList<object> vColl = helper.GetNextValueCollection(out vInstanceType); IList typedVColl = CollectionUtils.ToTypedIList(vColl, vInstanceType); parameters.Add(nakedObjectManager.CreateAdapter(typedVColl, null, null)); break; case ParameterType.ObjectCollection: Type oInstanceType; List<object> oColl = helper.GetNextObjectCollection(out oInstanceType).Cast<IOid>().Select(o => RestoreObject(o).Object).ToList(); IList typedOColl = CollectionUtils.ToTypedIList(oColl, oInstanceType); parameters.Add(nakedObjectManager.CreateAdapter(typedOColl, null, null)); break; default: throw new ArgumentException(string.Format("Unexpected parameter type value: {0}", parmType)); } } Parameters = parameters.ToArray(); }
public static object GetVersion(this INakedObjectAdapter nakedObjectAdapter, INakedObjectManager manager) { var versionProperty = nakedObjectAdapter.GetVersionProperty(); if (versionProperty != null) { var version = versionProperty.GetNakedObject(nakedObjectAdapter).GetDomainObject(); if (version is DateTime dtv) { return(dtv.StripMillis()); } return(version); } return(null); }
public override INakedObjectAdapter Invoke(INakedObjectAdapter inObjectAdapter, INakedObjectAdapter[] parameters, ILifecycleManager lifecycleManager, IMetamodelManager manager, ISession session, INakedObjectManager nakedObjectManager, IMessageBroker messageBroker, ITransactionManager transactionManager) { if (parameters.Length != paramCount) { Log.Error(actionMethod + " requires " + paramCount + " parameters, not " + parameters.Length); } object result; if (actionDelegate != null) { result = actionDelegate(inObjectAdapter.GetDomainObject(), parameters.Select(no => no.GetDomainObject()).ToArray()); } else { Log.WarnFormat("Invoking action via reflection as no delegate {0}.{1}", onType, actionMethod); result = InvokeUtils.Invoke(actionMethod, inObjectAdapter, parameters); } INakedObjectAdapter adaptedResult = nakedObjectManager.CreateAdapter(result, null, null); return adaptedResult; }
public NakedObjectAdapter(IMetamodelManager metamodel, ISession session, IObjectPersistor persistor, ILifecycleManager lifecycleManager, INakedObjectManager nakedObjectManager, object poco, IOid oid) { Assert.AssertNotNull(metamodel); Assert.AssertNotNull(session); if (poco is INakedObjectAdapter) { throw new AdapterException(Log.LogAndReturn($"Adapter can't be used to adapt an adapter: {poco}")); } this.metamodel = metamodel; this.session = session; this.persistor = persistor; this.nakedObjectManager = nakedObjectManager; this.lifecycleManager = lifecycleManager; this.poco = poco; Oid = oid; ResolveState = new ResolveStateMachine(this, session); version = new NullVersion(); }
// Start a snapshot at the root object, using supplied namespace manager. public XmlSnapshot(object obj, XmlSchema schema, INakedObjectManager nakedObjectManager, IMetamodelManager metamodelManager) { this.nakedObjectManager = nakedObjectManager; this.metamodelManager = metamodelManager; INakedObjectAdapter rootObjectAdapter = nakedObjectManager.CreateAdapter(obj, null, null); Schema = schema; try { XmlDocument = new XDocument(); XsdDocument = new XDocument(); XsdElement = XsMetaModel.CreateXsSchemaElement(XsdDocument); rootPlace = AppendXml(rootObjectAdapter); } catch (ArgumentException e) { throw new NakedObjectSystemException(Log.LogAndReturn("Unable to build snapshot"), e); } }
// Start a snapshot at the root object, using supplied namespace manager. public XmlSnapshot(object obj, XmlSchema schema, INakedObjectManager nakedObjectManager, IMetamodelManager metamodelManager) { this.nakedObjectManager = nakedObjectManager; this.metamodelManager = metamodelManager; INakedObjectAdapter rootObjectAdapter = nakedObjectManager.CreateAdapter(obj, null, null); Schema = schema; try { XmlDocument = new XDocument(); XsdDocument = new XDocument(); XsdElement = XsMetaModel.CreateXsSchemaElement(XsdDocument); rootPlace = AppendXml(rootObjectAdapter); } catch (ArgumentException e) { throw new NakedObjectSystemException(Log.LogAndReturn("Unable to build snapshot"), e); } }
// Start a snapshot at the root object, using supplied namespace manager. public XmlSnapshot(object obj, XmlSchema schema, INakedObjectManager nakedObjectManager, IMetamodelManager metamodelManager) { this.nakedObjectManager = nakedObjectManager; this.metamodelManager = metamodelManager; INakedObjectAdapter rootObjectAdapter = nakedObjectManager.CreateAdapter(obj, null, null); Log.Debug(".ctor(" + DoLog("rootObj", rootObjectAdapter) + AndLog("schema", schema) + AndLog("addOids", "" + true) + ")"); Schema = schema; try { XmlDocument = new XDocument(); XsdDocument = new XDocument(); XsdElement = XsMetaModel.CreateXsSchemaElement(XsdDocument); rootPlace = AppendXml(rootObjectAdapter); } catch (ArgumentException e) { Log.Error("unable to build snapshot", e); throw new NakedObjectSystemException(e); } }
public LifeCycleManager( IMetamodelManager metamodel, IPersistAlgorithm persistAlgorithm, IOidGenerator oidGenerator, IDomainObjectInjector injector, IObjectPersistor objectPersistor, INakedObjectManager nakedObjectManager ) { Assert.AssertNotNull(metamodel); Assert.AssertNotNull(persistAlgorithm); Assert.AssertNotNull(oidGenerator); Assert.AssertNotNull(injector); Assert.AssertNotNull(objectPersistor); Assert.AssertNotNull(nakedObjectManager); this.metamodel = metamodel; this.persistAlgorithm = persistAlgorithm; this.oidGenerator = oidGenerator; this.injector = injector; this.objectPersistor = objectPersistor; this.nakedObjectManager = nakedObjectManager; }
public LifeCycleManager( IMetamodelManager metamodel, IPersistAlgorithm persistAlgorithm, IOidGenerator oidGenerator, IDomainObjectInjector injector, IObjectPersistor objectPersistor, INakedObjectManager nakedObjectManager, ISession session, ILoggerFactory loggerFactory, ILogger <LifeCycleManager> logger ) { this.metamodel = metamodel ?? throw new InitialisationException($"{nameof(metamodel)} is null"); this.persistAlgorithm = persistAlgorithm ?? throw new InitialisationException($"{nameof(persistAlgorithm)} is null"); this.oidGenerator = oidGenerator ?? throw new InitialisationException($"{nameof(oidGenerator)} is null"); this.injector = injector ?? throw new InitialisationException($"{nameof(injector)} is null"); this.objectPersistor = objectPersistor ?? throw new InitialisationException($"{nameof(objectPersistor)} is null"); this.nakedObjectManager = nakedObjectManager ?? throw new InitialisationException($"{nameof(nakedObjectManager)} is null"); this.session = session; this.loggerFactory = loggerFactory ?? throw new InitialisationException($"{nameof(loggerFactory)} is null"); this.logger = logger ?? throw new InitialisationException($"{nameof(logger)} is null"); }
public LifeCycleManager( IMetamodelManager metamodel, IPersistAlgorithm persistAlgorithm, IOidGenerator oidGenerator, IDomainObjectInjector injector, IObjectPersistor objectPersistor, INakedObjectManager nakedObjectManager ) { Assert.AssertNotNull(metamodel); Assert.AssertNotNull(persistAlgorithm); Assert.AssertNotNull(oidGenerator); Assert.AssertNotNull(injector); Assert.AssertNotNull(objectPersistor); Assert.AssertNotNull(nakedObjectManager); this.metamodel = metamodel; this.persistAlgorithm = persistAlgorithm; this.oidGenerator = oidGenerator; this.injector = injector; this.objectPersistor = objectPersistor; this.nakedObjectManager = nakedObjectManager; }
// Start a snapshot at the root object, using supplied namespace manager. public XmlSnapshot(object obj, XmlSchema schema, INakedObjectManager nakedObjectManager, IMetamodelManager metamodelManager) { this.nakedObjectManager = nakedObjectManager; this.metamodelManager = metamodelManager; INakedObject rootObject = nakedObjectManager.CreateAdapter(obj, null, null); Log.Debug(".ctor(" + DoLog("rootObj", rootObject) + AndLog("schema", schema) + AndLog("addOids", "" + true) + ")"); Schema = schema; try { XmlDocument = new XDocument(); XsdDocument = new XDocument(); XsdElement = XsMetaModel.CreateXsSchemaElement(XsdDocument); rootPlace = AppendXml(rootObject); } catch (ArgumentException e) { Log.Error("unable to build snapshot", e); throw new NakedObjectSystemException(e); } }
public TestObjectFactory(IMetamodelManager metamodelManager, ISession session, ILifecycleManager lifecycleManager, IObjectPersistor persistor, INakedObjectManager manager, ITransactionManager transactionManager, IServicesManager servicesManager, IMessageBroker messageBroker) { this.metamodelManager = metamodelManager; Session = session; this.lifecycleManager = lifecycleManager; this.persistor = persistor; this.manager = manager; this.transactionManager = transactionManager; this.servicesManager = servicesManager; this.messageBroker = messageBroker; }
public override string GetTitle(INakedObjectAdapter nakedObjectAdapter, INakedObjectManager nakedObjectManager) { return(null); }
public ActionParseableParameterSpec(IMetamodelManager metamodel, int index, IActionSpec actionSpec, IActionParameterSpecImmutable actionParameterSpecImmutable, INakedObjectManager manager, ISession session, IObjectPersistor persistor) : base(metamodel, index, actionSpec, actionParameterSpecImmutable, manager, session, persistor) { }
public override INakedObjectAdapter Invoke(INakedObjectAdapter nakedObjectAdapter, INakedObjectAdapter[] parameters, int resultPage, ILifecycleManager lifecycleManager, IMetamodelManager manager, ISession session, INakedObjectManager nakedObjectManager, IMessageBroker messageBroker, ITransactionManager transactionManager) { profileManager.Begin(session, ProfileEvent.ActionInvocation, identifier.MemberName, nakedObjectAdapter, lifecycleManager); try { return(underlyingFacet.Invoke(nakedObjectAdapter, parameters, resultPage, lifecycleManager, manager, session, nakedObjectManager, messageBroker, transactionManager)); } finally { profileManager.End(session, ProfileEvent.ActionInvocation, identifier.MemberName, nakedObjectAdapter, lifecycleManager); } }
public TestParameterObject(INakedObjectManager manager, object domainObject) { this.manager = manager; this.domainObject = domainObject; }
public INakedObjectAdapter PageInternal <T>(int page, int size, INakedObjectAdapter collection, INakedObjectManager manager, bool forceEnumerable) { return(manager.CreateAdapter(AsGenericIEnumerable <T>(collection).Skip((page - 1) * size).Take(size).ToList(), null, null)); }
public static string GetMaskedValue(this ISpecification spec, IObjectFacade objectFacade, INakedObjectManager nakedObjectManager) { if (objectFacade == null) { return(null); } var mask = spec.GetFacet <IMaskFacet>(); var no = ((ObjectFacade)objectFacade).WrappedNakedObject; return(mask != null?no.Spec.GetFacet <ITitleFacet>().GetTitleWithMask(mask.Value, no, nakedObjectManager) : no.TitleString()); }
public static ITestNaked[] AsTestNakedArray(this object parameter, INakedObjectManager manager) { return(new[] { AsTestNaked(parameter, manager) }); }
public static IEnumerable <INakedObject> GetAsEnumerable(this INakedObject objectRepresentingCollection, INakedObjectManager manager) { return(objectRepresentingCollection.GetCollectionFacetFromSpec().AsEnumerable(objectRepresentingCollection, manager)); }
public override IEnumerable <INakedObjectAdapter> AsEnumerable(INakedObjectAdapter collection, INakedObjectManager manager) { return((IEnumerable <INakedObjectAdapter>)Call("AsEnumerableInternal", collection, collection, manager)); }
public IEnumerable <INakedObjectAdapter> AsEnumerableInternal <T>(INakedObjectAdapter collection, INakedObjectManager manager) { return(AsGenericIEnumerable <T>(collection).Select(arg => manager.CreateAdapter(arg, null, null))); }
// Start a snapshot at the root object, using own namespace manager. public XmlSnapshot(object obj, INakedObjectManager nakedObjectManager, IMetamodelManager metamodelManager) : this(obj, new XmlSchema(), nakedObjectManager, metamodelManager) {}
public override string[] Derive(INakedObjectAdapter nakedObjectAdapter, INakedObjectManager nakedObjectManager, IDomainObjectInjector injector, ISession session, IObjectPersistor persistor) => deriveFunction.Invoke(null, deriveFunction.GetParameterValues(nakedObjectAdapter, session, persistor)) as string[];
public override string GetTitle(INakedObject nakedObject, INakedObjectManager nakedObjectManager) { object obj = InvokeUtils.Invoke(method, nakedObject); return(obj == null ? null : nakedObjectManager.CreateAdapter(obj, null, null).TitleString()); }
public abstract IEnumerable<INakedObjectAdapter> AsEnumerable(INakedObjectAdapter collection, INakedObjectManager manager);
public override INakedObjectAdapter Invoke(INakedObjectAdapter nakedObjectAdapter, INakedObjectAdapter[] parameters, int resultPage, ILifecycleManager lifecycleManager, IMetamodelManager manager, ISession session, INakedObjectManager nakedObjectManager, IMessageBroker messageBroker, ITransactionManager transactionManager) { return Invoke(nakedObjectAdapter, parameters, lifecycleManager, manager, session, nakedObjectManager, messageBroker, transactionManager); }
public FlatPersistAlgorithm(IObjectPersistor persistor, INakedObjectManager manager) { this.persistor = persistor; this.manager = manager; }
public ObjectSpec(SpecFactory memberFactory, IMetamodelManager metamodelManager, INakedObjectManager nakedObjectManager, IObjectSpecImmutable innerSpec) : base(memberFactory, metamodelManager, nakedObjectManager, innerSpec) { }
public INakedObject ParseFromStream(Stream stream, string mimeType, string name, INakedObjectManager manager) { object obj = fromStream.ParseFromStream(stream, mimeType, name); return(manager.CreateAdapter(obj, null, null)); }
public OneToOneAssociationSpec(IMetamodelManager metamodel, IOneToOneAssociationSpecImmutable association, ISession session, ILifecycleManager lifecycleManager, INakedObjectManager manager, IObjectPersistor persistor, ITransactionManager transactionManager) : base(metamodel, association, session, lifecycleManager, manager) { this.persistor = persistor; this.transactionManager = transactionManager; }
public override INakedObjectAdapter Page(int page, int size, INakedObjectAdapter collection, INakedObjectManager manager, bool forceEnumerable) { return manager.CreateAdapter(PageInternal(page, size, collection, manager), null, null); }
private static ITestNaked AsTestNaked(this object parameter, INakedObjectManager manager) { return((parameter is ITestNaked) ? (ITestNaked)parameter : new TestParameterObject(manager, parameter)); }
public override string GetTitle(INakedObjectAdapter nakedObjectAdapter, INakedObjectManager nakedObjectManager) { return methodDelegate(nakedObjectAdapter.GetDomainObject(), new object[] {}) as string; }
public override string GetTitle(INakedObjectAdapter nakedObjectAdapter, INakedObjectManager nakedObjectManager) { return null; }
public abstract INakedObjectAdapter Page(int page, int size, INakedObjectAdapter collection, INakedObjectManager manager, bool forceEnumerable);