protected internal MemberSpecAbstract(string id, IMemberSpecImmutable memberSpec, ISession session, ILifecycleManager lifecycleManager, IMetamodelManager metamodelManager, IObjectPersistor persistor) { Id = id ?? throw new InitialisationException($"{nameof(id)} is null"); memberSpecImmutable = memberSpec ?? throw new InitialisationException($"{nameof(memberSpec)} is null"); Session = session ?? throw new InitialisationException($"{nameof(session)} is null"); LifecycleManager = lifecycleManager ?? throw new InitialisationException($"{nameof(lifecycleManager)} is null"); MetamodelManager = metamodelManager ?? throw new InitialisationException($"{nameof(metamodelManager)} is null"); Persistor = persistor ?? throw new InitialisationException($"{nameof(persistor)} is null");; }
protected internal MemberSpecAbstract(string id, IMemberSpecImmutable memberSpec, INakedObjectsFramework framework) { Id = id ?? throw new InitialisationException($"{nameof(id)} is null"); memberSpecImmutable = memberSpec ?? throw new InitialisationException($"{nameof(memberSpec)} is null"); Session = framework?.Session ?? throw new InitialisationException($"{nameof(framework.Session)} is null"); LifecycleManager = framework.LifecycleManager ?? throw new InitialisationException($"{nameof(framework.LifecycleManager)} is null"); MetamodelManager = framework.MetamodelManager ?? throw new InitialisationException($"{nameof(framework.MetamodelManager)} is null"); Persistor = framework.Persistor ?? throw new InitialisationException($"{nameof(framework.Persistor)} is null");; }
protected internal MemberSpecAbstract(string id, IMemberSpecImmutable memberSpec, ISession session, ILifecycleManager lifecycleManager, IMetamodelManager metamodelManager) { AssertArgNotNull(id, Resources.NakedObjects.NameNotSetMessage); AssertArgNotNull(memberSpec); AssertArgNotNull(session); AssertArgNotNull(lifecycleManager); this.id = id; memberSpecImmutable = memberSpec; this.session = session; this.lifecycleManager = lifecycleManager; this.metamodelManager = metamodelManager; }
public static void Compare(IMemberSpecImmutable assoc1, IMemberSpecImmutable assoc2, string specName) { Compare(assoc1.ReturnSpec, assoc2.ReturnSpec); // make sure same spec CompareTypeName(assoc1.Name, assoc2.Name, specName); CompareTypeName(assoc1.Description, assoc2.Description, specName); // only carry on to compare facets if first time if (HasBeenCompared(assoc1, assoc2)) { return; } Compare(assoc1 as ISpecification, assoc2, specName); }