Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b0c1489
Showing
33 changed files
with
1,219 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#OS junk files | ||
[Tt]humbs.db | ||
*.DS_Store | ||
|
||
#Visual Studio files | ||
*.[Oo]bj | ||
*.user | ||
*.aps | ||
*.pch | ||
*.vspscc | ||
*.vssscc | ||
*_i.c | ||
*_p.c | ||
*.ncb | ||
*.suo | ||
*.tlb | ||
*.tlh | ||
*.bak | ||
*.[Cc]ache | ||
*.ilk | ||
*.log | ||
*.lib | ||
*.sbr | ||
*.sdf | ||
*.opensdf | ||
*.unsuccessfulbuild | ||
ipch/ | ||
[Oo]bj/ | ||
[Bb]in | ||
[Dd]ebug*/ | ||
[Rr]elease*/ | ||
Ankh.NoLoad | ||
|
||
#MonoDevelop | ||
*.pidb | ||
*.userprefs | ||
|
||
#Tooling | ||
_ReSharper*/ | ||
*.resharper | ||
[Tt]est[Rr]esult* | ||
*.sass-cache | ||
|
||
#Project files | ||
[Bb]uild/ | ||
|
||
#Subversion files | ||
.svn | ||
|
||
# Office Temp Files | ||
~$* | ||
|
||
# vim Temp Files | ||
*~ | ||
|
||
#NuGet | ||
packages/ | ||
*.nupkg | ||
|
||
#ncrunch | ||
*ncrunch* | ||
*crunch*.local.xml | ||
|
||
# visual studio database projects | ||
*.dbmdl | ||
|
||
#Test files | ||
*.testsettings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 2013 | ||
VisualStudioVersion = 12.0.21005.1 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArchitectureScript", "ArchitectureScript\ArchitectureScript.csproj", "{07EDBD84-B267-4995-A8F6-D7B8D6BF100D}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{07EDBD84-B267-4995-A8F6-D7B8D6BF100D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{07EDBD84-B267-4995-A8F6-D7B8D6BF100D}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{07EDBD84-B267-4995-A8F6-D7B8D6BF100D}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{07EDBD84-B267-4995-A8F6-D7B8D6BF100D}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> | ||
</startup> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{07EDBD84-B267-4995-A8F6-D7B8D6BF100D}</ProjectGuid> | ||
<OutputType>Exe</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>ArchitectureScript</RootNamespace> | ||
<AssemblyName>ArchitectureScript</AssemblyName> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\packages\Newtonsoft.Json.6.0.3\lib\net45\Newtonsoft.Json.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Model\Component.cs" /> | ||
<Compile Include="Model\ComponentView.cs" /> | ||
<Compile Include="Parsing\ComponentSegmentWalker.cs" /> | ||
<Compile Include="Parsing\ComponentViewSegmentWalker.cs" /> | ||
<Compile Include="Parsing\ContainerSegmentWalker.cs" /> | ||
<Compile Include="Parsing\ElementSegmentWalker.cs" /> | ||
<Compile Include="Parsing\ISegmentWalker.cs" /> | ||
<Compile Include="Model\Container.cs" /> | ||
<Compile Include="Model\ContainerView.cs" /> | ||
<Compile Include="Model\ContextView.cs" /> | ||
<Compile Include="Model\Element.cs" /> | ||
<Compile Include="Model\ElementView.cs" /> | ||
<Compile Include="Model\Model.cs" /> | ||
<Compile Include="Model\Person.cs" /> | ||
<Compile Include="Model\Relationship.cs" /> | ||
<Compile Include="Model\RelationshipView.cs" /> | ||
<Compile Include="Model\SoftwareSystem.cs" /> | ||
<Compile Include="Model\View.cs" /> | ||
<Compile Include="Parsing\ModelSegmentWalker.cs" /> | ||
<Compile Include="Parsing\ParseAttribute.cs" /> | ||
<Compile Include="Parsing\Parser.cs" /> | ||
<Compile Include="Parsing\PersonSegmentWalker.cs" /> | ||
<Compile Include="Parsing\RelationshipSegmentWalker.cs" /> | ||
<Compile Include="Parsing\SystemSegmentWalker.cs" /> | ||
<Compile Include="Program.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="Parsing\Segment.cs" /> | ||
<Compile Include="Parsing\SegmentWalkerBase.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="App.config" /> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace ArchitectureScript.Model | ||
{ | ||
public class Component : Element | ||
{ | ||
public string Type { get { return "Component"; } } | ||
public string Technology { get; set; } | ||
public string ImplementationType { get; set; } | ||
public string InterfaceType { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace ArchitectureScript.Model | ||
{ | ||
public class ComponentView : View | ||
{ | ||
private readonly Container _container; | ||
|
||
public ComponentView(Container container) : base(container.Parent) | ||
{ | ||
_container = container; | ||
Name = String.Format("{0} - {1} - Components", container.Parent.Name, _container.Name); | ||
} | ||
|
||
|
||
public int ContainerId { get { return _container.Id; } } | ||
public string Type { get { return "Component"; } } | ||
|
||
public override void Normalize() | ||
{ | ||
foreach (var system in Model.SoftwareSystems.Where(x => x.Id != SoftwareSystemId)) | ||
AddElement(system); | ||
|
||
foreach (var container in System.Containers.Where(x => x.Id != _container.Id)) | ||
AddElement(container); | ||
|
||
foreach(var component in _container.Components) | ||
AddElement(component); | ||
|
||
base.Normalize(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace ArchitectureScript.Model | ||
{ | ||
public class Container : Element | ||
{ | ||
private readonly IList<Component> _components = new List<Component>(); | ||
|
||
public string Technology { get; set; } | ||
public string Type { get { return "Container"; } } | ||
public IEnumerable<Component> Components { get { return _components; } } | ||
|
||
internal SoftwareSystem Parent { get; set; } | ||
|
||
public Component AddComponent(string name) | ||
{ | ||
var component = Model.AddComponent(name); | ||
AddComponent(component); | ||
return component; | ||
} | ||
|
||
public void AddComponent(Component component) | ||
{ | ||
_components.Add(component); | ||
component.Location = this.Location; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace ArchitectureScript.Model | ||
{ | ||
public class ContainerView : View | ||
{ | ||
public ContainerView(SoftwareSystem system) : base(system) | ||
{ | ||
Name = String.Format("{0} - Containers", system.Name); | ||
} | ||
|
||
public string Type { get { return "Container"; } } | ||
|
||
public override void Normalize() | ||
{ | ||
foreach (var system in Model.SoftwareSystems.Where(x => x.Id != SoftwareSystemId)) | ||
AddElement(system); | ||
|
||
foreach (var person in Model.People) | ||
AddElement(person); | ||
|
||
foreach (var container in System.Containers) | ||
AddElement(container); | ||
|
||
base.Normalize(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace ArchitectureScript.Model | ||
{ | ||
public class ContextView : View | ||
{ | ||
public ContextView(SoftwareSystem system) : base(system) { } | ||
|
||
public string Type { get { return "SystemContext"; } } | ||
|
||
public override void Normalize() | ||
{ | ||
foreach (var system in Model.SoftwareSystems) | ||
AddElement(system); | ||
|
||
foreach (var person in Model.People) | ||
AddElement(person); | ||
|
||
base.Normalize(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace ArchitectureScript.Model | ||
{ | ||
public abstract class Element | ||
{ | ||
public Model Model { get; set; } | ||
public int Id { get; set; } | ||
public string Name { get; set; } | ||
public string Description { get; set; } | ||
public string Location { get; set; } | ||
|
||
private readonly IList<Relationship> _relationships = new List<Relationship>(); | ||
|
||
public Relationship AddRelationship(string destination, string description) | ||
{ | ||
var relationship = new Relationship(); | ||
relationship.Source = this; | ||
relationship.DestinationTag = destination; | ||
relationship.Description = description; | ||
_relationships.Add(relationship); | ||
return relationship; | ||
} | ||
|
||
public void Normalise() | ||
{ | ||
foreach (var relationship in _relationships) | ||
{ | ||
relationship.Destination = Model.GetElementByName(relationship.DestinationTag); | ||
} | ||
} | ||
|
||
public IEnumerable<Relationship> Relationships | ||
{ | ||
get { return _relationships; } | ||
} | ||
|
||
public bool ShouldSerializeModel() | ||
{ | ||
return false; | ||
} | ||
} | ||
} |
Oops, something went wrong.