Skip to content

Commit 3de7378

Browse files
committed
Merge branch 'master' of https://github.com/mpostol/ASMD
2 parents a3d5d62 + 0bd3d5a commit 3de7378

File tree

11 files changed

+194
-46
lines changed

11 files changed

+194
-46
lines changed

ModelDesigner.Configuration.UnitTests/Instrumentation/ConfigurationBaseImplementation.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-

1+
//___________________________________________________________________________________
2+
//
3+
// Copyright (C) 2019, Mariusz Postol LODZ POLAND.
4+
//
5+
//___________________________________________________________________________________
6+
27
using CAS.UA.IServerConfiguration;
38
using System;
49
using System.IO;

ModelDesigner.Configuration.UnitTests/ModelDesigner.Configuration.UnitTests.csproj

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@
9696
<HintPath>..\packages\CAS.Windows.Forms.6.1.2\lib\net451\CAS.Windows.Forms.dll</HintPath>
9797
<Private>True</Private>
9898
</Reference>
99+
<Reference Include="CommonServiceLocator, Version=2.0.4.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
100+
<HintPath>..\packages\CommonServiceLocator.2.0.4\lib\net47\CommonServiceLocator.dll</HintPath>
101+
</Reference>
99102
<Reference Include="Microsoft.Build.Framework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
100103
<HintPath>..\packages\CAS.CodeProtect.6.1.3\lib\net451\Microsoft.Build.Framework.dll</HintPath>
101104
<Private>True</Private>
@@ -119,18 +122,21 @@
119122
<Reference Include="System.Core">
120123
<RequiredTargetFramework>3.5</RequiredTargetFramework>
121124
</Reference>
122-
<Reference Include="System.Runtime.Serialization" />
123-
<Reference Include="UAOOI.Common.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=deede3c2df331bb0, processorArchitecture=MSIL">
124-
<HintPath>..\packages\UAOOI.Configuration.Networking.2.0.3-Delta\lib\net461\UAOOI.Common.Infrastructure.dll</HintPath>
125+
<Reference Include="System.Diagnostics.TraceSource, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
126+
<HintPath>..\packages\System.Diagnostics.TraceSource.4.3.0\lib\net46\System.Diagnostics.TraceSource.dll</HintPath>
127+
<Private>True</Private>
125128
<Private>True</Private>
126129
</Reference>
130+
<Reference Include="System.Runtime.Serialization" />
131+
<Reference Include="UAOOI.Common.Infrastructure, Version=4.0.1.0, Culture=neutral, PublicKeyToken=deede3c2df331bb0, processorArchitecture=MSIL">
132+
<HintPath>..\packages\UAOOI.Common.Infrastructure.4.0.1\lib\netstandard2.0\UAOOI.Common.Infrastructure.dll</HintPath>
133+
</Reference>
127134
<Reference Include="UAOOI.Configuration.DataBindings, Version=2.0.3.26091, Culture=neutral, PublicKeyToken=deede3c2df331bb0, processorArchitecture=MSIL">
128135
<HintPath>..\packages\UAOOI.Configuration.DataBindings.2.0.3-Delta\lib\net461\UAOOI.Configuration.DataBindings.dll</HintPath>
129136
<Private>True</Private>
130137
</Reference>
131-
<Reference Include="UAOOI.Configuration.Networking, Version=2.0.3.25935, Culture=neutral, PublicKeyToken=deede3c2df331bb0, processorArchitecture=MSIL">
132-
<HintPath>..\packages\UAOOI.Configuration.Networking.2.0.3-Delta\lib\net461\UAOOI.Configuration.Networking.dll</HintPath>
133-
<Private>True</Private>
138+
<Reference Include="UAOOI.Configuration.Networking, Version=4.0.1.1, Culture=neutral, PublicKeyToken=deede3c2df331bb0, processorArchitecture=MSIL">
139+
<HintPath>..\packages\UAOOI.Configuration.Networking.4.0.1\lib\netstandard2.0\UAOOI.Configuration.Networking.dll</HintPath>
134140
</Reference>
135141
</ItemGroup>
136142
<ItemGroup>
@@ -146,6 +152,7 @@
146152
<Compile Include="ServerWrapper_UAOOI_UnitTest.cs" />
147153
</ItemGroup>
148154
<ItemGroup>
155+
<None Include="app.config" />
149156
<None Include="cas.snk" />
150157
<None Include="packages.config">
151158
<SubType>Designer</SubType>

ModelDesigner.Configuration.UnitTests/ServerWrapper_UAOOI_UnitTest.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class ServerWrapper_UAOOI_UnitTest
2323
[DeploymentItem(@"TestData\", @"TestData\")]
2424
public void EnvironmentTest()
2525
{
26-
FileInfo _configurationFile = new FileInfo(_ConfigurationBaseFileName);
26+
FileInfo _configurationFile = new FileInfo(m_ConfigurationBaseFileName);
2727
Assert.IsTrue(_configurationFile.Exists);
2828
Instrumentation.ConfigurationBaseImplementation _serverConfiguration = new Instrumentation.ConfigurationBaseImplementation();
2929
Assert.IsNull(_serverConfiguration.CurrentConfiguration);
@@ -46,11 +46,12 @@ public void UAOOIDataBindingsTestMethod()
4646
_serverConfiguration.CreateDefaultConfiguration();
4747
Assert.IsTrue(_configurationChanged);
4848
_configurationChanged = false;
49-
ServerWrapper _sw = new ServerWrapper(_serverConfiguration, _pluginAssembly, new GraphicalUserInterface(), _ConfigurationBaseFileName);
49+
//TODO UANetworkingConfiguration[T].ReadConfiguration shows popup if file has errors #73
50+
ServerWrapper _sw = new ServerWrapper(_serverConfiguration, _pluginAssembly, new GraphicalUserInterface(), m_ConfigurationBaseFileName);
5051
Assert.IsNotNull(_sw);
5152
Assert.IsTrue(_configurationChanged);
5253
}
53-
private const string _ConfigurationBaseFileName = @"TestData\ConfigurationDataConsumer.xml";
54+
private const string m_ConfigurationBaseFileName = @"TestData\ConfigurationDataConsumer.xml";
5455
private class GraphicalUserInterface : IGraphicalUserInterface
5556
{
5657
public Action<string, string> MessageBoxShowError

ModelDesigner.Configuration.UnitTests/TestData/ConfigurationDataConsumer.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
<MessageHandlers>
4343
<MessageHandlerConfiguration i:type="MessageReaderConfiguration">
4444
<Name>UDP</Name>
45+
<Configuration>
46+
<ChannelConfiguration>4840,True,239.255.255.1,True</ChannelConfiguration>
47+
</Configuration>
4548
<TransportRole>Consumer</TransportRole>
4649
<ConsumerAssociationConfigurations>
4750
<ConsumerAssociationConfiguration>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<runtime>
4+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
5+
<dependentAssembly>
6+
<assemblyIdentity name="UAOOI.Configuration.Networking" publicKeyToken="deede3c2df331bb0" culture="neutral" />
7+
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
8+
</dependentAssembly>
9+
<dependentAssembly>
10+
<assemblyIdentity name="UAOOI.Common.Infrastructure" publicKeyToken="deede3c2df331bb0" culture="neutral" />
11+
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
12+
</dependentAssembly>
13+
</assemblyBinding>
14+
</runtime>
15+
</configuration>

ModelDesigner.Configuration.UnitTests/packages.config

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@
1010
<package id="CAS.UA.Common" version="3.00.05" targetFramework="net461" />
1111
<package id="CAS.UA.IServerConfiguration" version="1.00.00" targetFramework="net461" />
1212
<package id="CAS.Windows.Forms" version="6.1.2" targetFramework="net461" />
13+
<package id="CommonServiceLocator" version="2.0.4" targetFramework="net472" />
1314
<package id="MSTest.TestAdapter" version="2.0.0" targetFramework="net472" />
1415
<package id="MSTest.TestFramework" version="2.0.0" targetFramework="net472" />
16+
<package id="System.Diagnostics.TraceSource" version="4.3.0" targetFramework="net472" />
17+
<package id="UAOOI.Common.Infrastructure" version="4.0.1" targetFramework="net472" />
1518
<package id="UAOOI.Configuration.DataBindings" version="2.0.3-Delta" targetFramework="net461" />
16-
<package id="UAOOI.Configuration.Networking" version="2.0.3-Delta" targetFramework="net461" />
19+
<package id="UAOOI.Configuration.Networking" version="4.0.1" targetFramework="net472" />
1720
</packages>

ModelDesigner.Configuration/ConfigurationWrapper.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ private void Read(FileInfo newFile)
232232
{
233233
try
234234
{
235+
//TODO UANetworkingConfiguration[T].ReadConfiguration shows popup if file has errors #73
235236
m_ServerConfiguration.ReadConfiguration(newFile);
236237
ConfigurationFile = newFile;
237238
}

ModelDesigner.DesignStudio/ModelDesigner.DesignStudio.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@
760760
<PropertyGroup>
761761
<PreBuildEvent>
762762
</PreBuildEvent>
763-
<PostBuildEvent>
764-
</PostBuildEvent>
763+
<PostBuildEvent>xcopy "$(SolutionDir)packages\CAS.CommServer.UA.ConfigurationEditor.ServerConfiguration.3.20.4\lib\net461\*.*" $(TargetDir) /y
764+
xcopy "$(SolutionDir)packages\CAS.CommServer.DAServerConfiguration.5.01.06\lib\net451\*.*" $(TargetDir) /y</PostBuildEvent>
765765
</PropertyGroup>
766766
</Project>

ModelDesigner.DesignStudio/Wrappers/ProjectTreeNode.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,6 @@ internal string FilePath
156156
return Path.GetFullPath(Path.Combine(this.m_SolutionHomeDirectory.GetBaseDirectory(), this.FileName));
157157
}
158158
}
159-
internal ProjectTreeNode CloneProject()
160-
{
161-
throw new NotImplementedException();
162-
}
163159
internal string CSVFileName
164160
{
165161
get
@@ -187,8 +183,6 @@ internal string BuildOutputDirectoryName
187183
set => UAModelDesignerProject.BuildOutputDirectoryName = value;
188184
}
189185
internal string BuildOutputDirectoryPath => ReplaceTokenAndReturnFullPath(BuildOutputDirectoryName);
190-
[Obsolete]
191-
internal void SetNewSolutionHomeDirectory(string newPath) { }
192186
internal bool SaveModel(string solutionDirectory, XmlFile.DataToSerialize<Opc.Ua.ModelCompiler.ModelDesign> config)
193187
{
194188
return m_ModelDesign.SaveModel(FilePath);
@@ -208,16 +202,6 @@ internal bool Save()
208202
{
209203
return m_ModelDesign.SaveModel(FilePath);
210204
}
211-
//TODO it could be omitted - it was used to create relative paths, but now all gets create relative paths.
212-
/// <summary>
213-
/// Clones the project.
214-
/// </summary>
215-
/// <param name="solutionPath">The solution path.</param>
216-
/// <returns>Copy of the project</returns>
217-
//internal ProjectWrapper CloneProject(string solutionPath)
218-
//{
219-
// return new ProjectWrapper(m_ProjectViewModel, solutionPath);
220-
//}
221205
/// <summary>
222206
/// Validates this instance.
223207
/// </summary>

ModelDesigner.DesignStudio/Wrappers/SolutionTreeNode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ private UAModelDesignerSolution SaveProjectsCreateConfiguration()
7676
List<ProjectTreeNode> _ListOfProjects = new List<ProjectTreeNode>();
7777
foreach (ProjectTreeNode _project in this)
7878
if (_project.Save())
79-
_ListOfProjects.Add(_project.CloneProject());
79+
_ListOfProjects.Add(_project);
8080
this.Clear();
8181
this.AddRange(_ListOfProjects);
8282
return new UAModelDesignerSolution()

0 commit comments

Comments
 (0)