/// <summary> /// Registers a dependency to a given software model. /// </summary> public void AddDependency(SoftwareModel container, SoftwareModel softwareModel, string description = null) { Guard.ArgumentNotNull(container, nameof(container)); Guard.ArgumentNotNull(softwareModel, nameof(softwareModel)); var dependency = new SoftwareModelDependency(container, softwareModel, description); if (dependency.SoftwareModelId == dependency.SoftwareModelDependencyId) { throw new RuleException("Cannot register self as a dependency."); } _softwareModelDependencyService.Add(dependency); }
// commit to the underling data store protected override void Commit(LoaderState <List <MaybeEntity> > loadState) { _provider.Add(loadState.Valid); }