public DataContainer GetDataContainerWithoutLoading(ObjectID objectID) { ArgumentUtility.CheckNotNull("objectID", objectID); if (_invalidDomainObjectManager.IsInvalid(objectID)) { throw new ObjectInvalidException(objectID); } return(DataContainers[objectID]); }
public DomainObject GetObjectReference(ObjectID objectID) { ArgumentUtility.CheckNotNull("objectID", objectID); if (_invalidDomainObjectManager.IsInvalid(objectID)) { return(_invalidDomainObjectManager.GetInvalidObjectReference(objectID)); } var enlistedObject = _enlistedDomainObjectManager.GetEnlistedDomainObject(objectID); if (enlistedObject != null) { return(enlistedObject); } var creator = objectID.ClassDefinition.InstanceCreator; var initializationContext = new ObjectReferenceInitializationContext( objectID, _clientTransaction.RootTransaction, _enlistedDomainObjectManager); return(creator.CreateObjectReference(initializationContext, _clientTransaction)); }
public ILoadedObjectData GetLoadedObject(ObjectID objectID) { ArgumentUtility.CheckNotNull("objectID", objectID); if (_invalidDomainObjectManager.IsInvalid(objectID)) { return(new InvalidLoadedObjectData(_invalidDomainObjectManager.GetInvalidObjectReference(objectID))); } var dataContainer = _loadedDataContainerProvider.GetDataContainerWithoutLoading(objectID); return(dataContainer != null ? new AlreadyExistingLoadedObjectData(dataContainer) : null); }
public bool IsInvalid(ObjectID objectID) { ArgumentUtility.CheckNotNull("objectID", objectID); return(_parentInvalidDomainObjectManager.IsInvalid(objectID)); }