Class Model
A software architecture model.
[DataContract]
public sealed class Model
- Inheritance
-
Model
- Inherited Members
Fields
IdGenerator
Generates unique string identifiers for elements and relationships added to the model.
public IdGenerator IdGenerator
Field Value
ImpliedRelationshipsStrategy
Controls whether additional implied relationships are created when static structure relationships are added.
public IImpliedRelationshipsStrategy ImpliedRelationshipsStrategy
Field Value
Properties
DeploymentNodes
The top-level deployment nodes defined in the model.
[DataMember(Name = "deploymentNodes", EmitDefaultValue = false)]
public ISet<DeploymentNode> DeploymentNodes { get; }
Property Value
Enterprise
The enterprise boundary associated with this model, when one is defined.
[DataMember(Name = "enterprise", EmitDefaultValue = false)]
public Enterprise Enterprise { get; set; }
Property Value
People
The people defined in the model.
[DataMember(Name = "people", EmitDefaultValue = false)]
public ISet<Person> People { get; }
Property Value
Relationships
All relationships currently registered in the model.
public ICollection<Relationship> Relationships { get; }
Property Value
SoftwareSystems
The software systems defined in the model.
[DataMember(Name = "softwareSystems", EmitDefaultValue = false)]
public ISet<SoftwareSystem> SoftwareSystems { get; }
Property Value
Methods
AddDeploymentNode(string)
Adds a top-level deployment node in the default deployment environment.
public DeploymentNode AddDeploymentNode(string name)
Parameters
namestringThe deployment node name.
Returns
- DeploymentNode
The created deployment node.
AddDeploymentNode(string, string, string)
Adds a top-level deployment node in the default deployment environment.
public DeploymentNode AddDeploymentNode(string name, string description, string technology)
Parameters
namestringThe deployment node name.
descriptionstringA short description of the deployment node.
technologystringThe technology or product represented by the deployment node.
Returns
- DeploymentNode
The created deployment node.
AddDeploymentNode(string, string, string, int)
Adds a top-level deployment node with an explicit instance count in the default environment.
public DeploymentNode AddDeploymentNode(string name, string description, string technology, int instances)
Parameters
namestringThe deployment node name.
descriptionstringA short description of the deployment node.
technologystringThe technology or product represented by the deployment node.
instancesintThe number of identical deployment node instances.
Returns
- DeploymentNode
The created deployment node.
AddDeploymentNode(string, string, string, int, Dictionary<string, string>)
Adds a top-level deployment node with custom properties in the default environment.
public DeploymentNode AddDeploymentNode(string name, string description, string technology, int instances, Dictionary<string, string> properties)
Parameters
namestringThe deployment node name.
descriptionstringA short description of the deployment node.
technologystringThe technology or product represented by the deployment node.
instancesintThe number of identical deployment node instances.
propertiesDictionary<string, string>Custom name-value properties for the deployment node.
Returns
- DeploymentNode
The created deployment node.
AddDeploymentNode(string, string, string, string)
Adds a top-level deployment node in the specified deployment environment.
public DeploymentNode AddDeploymentNode(string environment, string name, string description, string technology)
Parameters
environmentstringThe deployment environment name.
namestringThe deployment node name.
descriptionstringA short description of the deployment node.
technologystringThe technology or product represented by the deployment node.
Returns
- DeploymentNode
The created deployment node.
AddDeploymentNode(string, string, string, string, int)
Adds a top-level deployment node with an explicit instance count in the specified environment.
public DeploymentNode AddDeploymentNode(string environment, string name, string description, string technology, int instances)
Parameters
environmentstringThe deployment environment name.
namestringThe deployment node name.
descriptionstringA short description of the deployment node.
technologystringThe technology or product represented by the deployment node.
instancesintThe number of identical deployment node instances.
Returns
- DeploymentNode
The created deployment node.
AddDeploymentNode(string, string, string, string, int, Dictionary<string, string>)
Adds a top-level deployment node with custom properties in the specified environment.
public DeploymentNode AddDeploymentNode(string environment, string name, string description, string technology, int instances, Dictionary<string, string> properties)
Parameters
environmentstringThe deployment environment name.
namestringThe deployment node name.
descriptionstringA short description of the deployment node.
technologystringThe technology or product represented by the deployment node.
instancesintThe number of identical deployment node instances.
propertiesDictionary<string, string>Custom name-value properties for the deployment node.
Returns
- DeploymentNode
The created deployment node.
AddImplicitRelationships()
Propagates all relationships from children to their parents. For example, if you have two components (AAA and BBB) in different software systems that have a relationship, calling this method will add the following additional implied relationships to the model: AAA->BB AAA-->B AA->BBB AA->BB AA->B A->BBB A->BB A->B.
public ISet<Relationship> AddImplicitRelationships()
Returns
- ISet<Relationship>
a set of all implicit relationships
AddPerson(Location, string, string)
Creates a person (location is unspecified) and adds it to the model (unless one exisrs with the same name already.
public Person AddPerson(Location location, string name, string description)
Parameters
locationLocationthe location of the person (e.g. internal, external, etc)
namestringthe name of the person (e.g. "Admin User" or "Bob the Business User")
descriptionstringa short description of the person
Returns
- Person
the Person instance created and added to the model (or null)
AddPerson(string)
Creates a person (location is unspecified) and adds it to the model (unless one exists with the same name already.
public Person AddPerson(string name)
Parameters
namestringthe name of the person (e.g. "Admin User" or "Bob the Business User")
Returns
- Person
the Person instance created and added to the model (or null)
AddPerson(string, string)
Creates a person (location is unspecified) and adds it to the model (unless one exists with the same name already.
public Person AddPerson(string name, string description)
Parameters
namestringthe name of the person (e.g. "Admin User" or "Bob the Business User")
descriptionstringa short description of the person
Returns
- Person
the Person instance created and added to the model (or null)
AddSoftwareSystem(Location, string, string)
Creates a software system (location is unspecified) and adds it to the model (unless one exists with the same name already).
public SoftwareSystem AddSoftwareSystem(Location location, string name, string description)
Parameters
locationLocationThe location of the software system (e.g. internal, external, etc)
namestringThe name of the software system
descriptionstringA short description of the software system.
Returns
- SoftwareSystem
the SoftwareSystem instance created and added to the model (or null)
AddSoftwareSystem(string)
Creates a software system (location is unspecified) and adds it to the model (unless one exists with the same name already).
public SoftwareSystem AddSoftwareSystem(string name)
Parameters
namestringThe name of the software system.
Returns
- SoftwareSystem
the SoftwareSystem instance created and added to the model (or null)
AddSoftwareSystem(string, string)
Creates a software system (location is unspecified) and adds it to the model (unless one exists with the same name already).
public SoftwareSystem AddSoftwareSystem(string name, string description)
Parameters
namestringThe name of the software system.
descriptionstringA short description of the software system.
Returns
- SoftwareSystem
the SoftwareSystem instance created and added to the model (or null)
Contains(Element)
Determines whether the model already contains the specified element instance.
public bool Contains(Element element)
Parameters
elementElementThe element to look for.
Returns
GetDeploymentNodeWithName(string, string)
Gets the DeploymentNode with the specified name.
public DeploymentNode GetDeploymentNodeWithName(string name, string environment)
Parameters
namestringthe name of the deployment node
environmentstringthe name of the deployment environment
Returns
- DeploymentNode
the DeploymentNode instance with the specified name (or null if it doesn't exist)
GetElement(string)
Gets an element by identifier.
public Element GetElement(string id)
Parameters
idstringThe element identifier.
Returns
- Element
The matching element.
GetElementWithCanonicalName(string)
Gets the element with the specified canonical name.
public Element GetElementWithCanonicalName(string canonicalName)
Parameters
canonicalNamestringthe canonical name (e.g. /SoftwareSystem/Container)
Returns
- Element
the Element with the given canonical name, or null if one doesn't exist
GetElements()
Returns all elements currently registered in the model.
public IEnumerable<Element> GetElements()
Returns
- IEnumerable<Element>
An enumeration of model elements.
GetPersonWithName(string)
Gets the Person instance with the specified name.
public Person GetPersonWithName(string name)
Parameters
namestringThe person name to search for.
Returns
- Person
A Person instance, or null if one doesn't exist.
GetRelationship(string)
Gets a relationship by identifier.
public Relationship GetRelationship(string id)
Parameters
idstringThe relationship identifier.
Returns
- Relationship
The matching relationship.
GetSoftwareSystemWithId(string)
Gets the software system with the specified identifier.
public SoftwareSystem GetSoftwareSystemWithId(string id)
Parameters
idstringThe identifier of the software system to find.
Returns
- SoftwareSystem
The matching software system, or null if one does not exist.
GetSoftwareSystemWithName(string)
Gets the SoftwareSystem instance with the specified name.
public SoftwareSystem GetSoftwareSystemWithName(string name)
Parameters
namestringThe software system name to search for.
Returns
- SoftwareSystem
A SoftwareSystem instance, or null if one doesn't exist.
ModifyRelationship(Relationship, string, string)
Provides a way for the description and technology to be modified on an existing relationship.
public void ModifyRelationship(Relationship relationship, string description, string technology)
Parameters
relationshipRelationshipa Relationship instance
descriptionstringthe new description
technologystringthe new technology