-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- dded a placeholder and serialization stuff
- Loading branch information
Showing
7 changed files
with
288 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
SemanticData/SolutionConfiguration/SemanticData..SolutionConfiguration.csproj
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,9 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<AssemblyName>UAOOI.SemanticData.SolutionConfiguration</AssemblyName> | ||
<RootNamespace>UAOOI.SemanticData.SolutionConfiguration</RootNamespace> | ||
</PropertyGroup> | ||
|
||
</Project> |
2 changes: 2 additions & 0 deletions
2
SemanticData/SolutionConfiguration/Serialization/UAModelDesignerSolution.GoCS.cmd
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,2 @@ | ||
:: convert the scheme DomainDescriptor.xsd to cs code | ||
xsd.exe UAModelDesignerSolution.xsd /N:UAOOI.SemanticData.SolutionConfiguration.Serialization /c |
1 change: 1 addition & 0 deletions
1
SemanticData/SolutionConfiguration/Serialization/UAModelDesignerSolution.GoXSD.cmd
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 @@ | ||
xsd.exe ..\bin\Debug\UAOOI.SemanticData.SolutionConfiguration.dll /t:UAOOI.SemanticData.SolutionConfiguration.Serialization.UAModelDesignerSolution |
67 changes: 67 additions & 0 deletions
67
SemanticData/SolutionConfiguration/Serialization/UAModelDesignerSolution.cs
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,67 @@ | ||
//__________________________________________________________________________________________________ | ||
// | ||
// Copyright (C) 2021, Mariusz Postol LODZ POLAND. | ||
// | ||
// To be in touch join the community at GitHub: https://github.com/mpostol/OPC-UA-OOI/discussions | ||
//__________________________________________________________________________________________________ | ||
|
||
using System; | ||
using System.IO; | ||
using System.Runtime.Serialization; | ||
|
||
namespace UAOOI.SemanticData.SolutionConfiguration.Serialization | ||
{ | ||
/// <summary> | ||
/// Class UAModelDesignerSolution. | ||
/// </summary> | ||
public partial class UAModelDesignerSolution | ||
{ | ||
/// <summary> | ||
/// Creates an empty solution model. | ||
/// </summary> | ||
/// <returns>UAModelDesignerSolution.</returns> | ||
internal static UAModelDesignerSolution CreateEmptyModel(string solutionName) | ||
{ | ||
return new UAModelDesignerSolution() | ||
{ | ||
Name = solutionName, | ||
Projects = new UAModelDesignerProject[] { }, | ||
ServerDetails = UAModelDesignerSolutionServerDetails.CreateEmptyInstance() | ||
}; | ||
} | ||
|
||
[OnDeserialized()] | ||
public void OnDeserialized(StreamingContext context) | ||
{ | ||
ServerDetails = ServerDetails ?? UAModelDesignerSolutionServerDetails.CreateEmptyInstance(); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Class UAModelDesignerSolutionServerDetails - encapsulates details about the associated server configuration | ||
/// </summary> | ||
public partial class UAModelDesignerSolutionServerDetails | ||
{ | ||
internal static UAModelDesignerSolutionServerDetails CreateEmptyInstance() | ||
{ | ||
return new UAModelDesignerSolutionServerDetails() { codebase = string.Empty, configuration = string.Empty }; | ||
} | ||
} | ||
|
||
internal enum ResourceEntries { Token_ProjectFileName, DefaultCSVFileName, Project_FileDialogDefaultExt }; | ||
|
||
public partial class UAModelDesignerProject | ||
{ | ||
internal static UAModelDesignerProject CreateEmpty(string name, Func<ResourceEntries, string> resource) | ||
{ | ||
return new UAModelDesignerProject() | ||
{ | ||
buildOutputDirectoryNameField = resource(ResourceEntries.Token_ProjectFileName), | ||
cSVFileNameField = resource(ResourceEntries.DefaultCSVFileName), | ||
fileNameField = Path.ChangeExtension(resource(ResourceEntries.Token_ProjectFileName), resource(ResourceEntries.Project_FileDialogDefaultExt)), | ||
nameField = name, | ||
ProjectIdentifier = Guid.NewGuid().ToString(), | ||
}; | ||
} | ||
} | ||
} |
170 changes: 170 additions & 0 deletions
170
SemanticData/SolutionConfiguration/Serialization/UAModelDesignerSolution.design.cs
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,170 @@ | ||
//------------------------------------------------------------------------------ | ||
// <auto-generated> | ||
// This code was generated by a tool. | ||
// Runtime Version:4.0.30319.42000 | ||
// | ||
// Changes to this file may cause incorrect behavior and will be lost if | ||
// the code is regenerated. | ||
// </auto-generated> | ||
//------------------------------------------------------------------------------ | ||
|
||
// | ||
// This source code was auto-generated by xsd, Version=4.6.1055.0. | ||
// | ||
namespace UAOOI.SemanticData.SolutionConfiguration.Serialization | ||
{ | ||
using System.Xml.Serialization; | ||
|
||
|
||
/// <remarks/> | ||
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")] | ||
[System.SerializableAttribute()] | ||
[System.Diagnostics.DebuggerStepThroughAttribute()] | ||
[System.ComponentModel.DesignerCategoryAttribute("code")] | ||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] | ||
[System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=false)] | ||
public partial class UAModelDesignerSolution { | ||
|
||
private string nameField; | ||
|
||
private UAModelDesignerProject[] projectsField; | ||
|
||
private UAModelDesignerSolutionServerDetails serverDetailsField; | ||
|
||
/// <remarks/> | ||
public string Name { | ||
get { | ||
return this.nameField; | ||
} | ||
set { | ||
this.nameField = value; | ||
} | ||
} | ||
|
||
/// <remarks/> | ||
[System.Xml.Serialization.XmlArrayItemAttribute("UAModelDesignerProject", IsNullable=false)] | ||
public UAModelDesignerProject[] Projects { | ||
get { | ||
return this.projectsField; | ||
} | ||
set { | ||
this.projectsField = value; | ||
} | ||
} | ||
|
||
/// <remarks/> | ||
public UAModelDesignerSolutionServerDetails ServerDetails { | ||
get { | ||
return this.serverDetailsField; | ||
} | ||
set { | ||
this.serverDetailsField = value; | ||
} | ||
} | ||
} | ||
|
||
/// <remarks/> | ||
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")] | ||
[System.SerializableAttribute()] | ||
[System.Diagnostics.DebuggerStepThroughAttribute()] | ||
[System.ComponentModel.DesignerCategoryAttribute("code")] | ||
[System.Xml.Serialization.XmlTypeAttribute(TypeName = "UAModelDesignerProject", AnonymousType=false)] | ||
public partial class UAModelDesignerProject { | ||
|
||
private string nameField; | ||
|
||
private string cSVFileNameField; | ||
|
||
private string buildOutputDirectoryNameField; | ||
|
||
private string fileNameField; | ||
|
||
private string projectIdentifierField; | ||
|
||
/// <remarks/> | ||
public string Name { | ||
get { | ||
return this.nameField; | ||
} | ||
set { | ||
this.nameField = value; | ||
} | ||
} | ||
|
||
/// <remarks/> | ||
public string CSVFileName { | ||
get { | ||
return this.cSVFileNameField; | ||
} | ||
set { | ||
this.cSVFileNameField = value; | ||
} | ||
} | ||
|
||
/// <remarks/> | ||
public string BuildOutputDirectoryName { | ||
get { | ||
return this.buildOutputDirectoryNameField; | ||
} | ||
set { | ||
this.buildOutputDirectoryNameField = value; | ||
} | ||
} | ||
|
||
/// <remarks/> | ||
public string FileName { | ||
get { | ||
return this.fileNameField; | ||
} | ||
set { | ||
this.fileNameField = value; | ||
} | ||
} | ||
|
||
/// <remarks/> | ||
[System.Xml.Serialization.XmlAttributeAttribute()] | ||
public string ProjectIdentifier { | ||
get { | ||
return this.projectIdentifierField; | ||
} | ||
set { | ||
this.projectIdentifierField = value; | ||
} | ||
} | ||
} | ||
|
||
/// <remarks/> | ||
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")] | ||
[System.SerializableAttribute()] | ||
[System.Diagnostics.DebuggerStepThroughAttribute()] | ||
[System.ComponentModel.DesignerCategoryAttribute("code")] | ||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] | ||
public partial class UAModelDesignerSolutionServerDetails { | ||
|
||
private string codebaseField; | ||
|
||
private string configurationField; | ||
|
||
/// <remarks/> | ||
[System.Xml.Serialization.XmlAttributeAttribute()] | ||
public string codebase { | ||
get { | ||
return this.codebaseField; | ||
} | ||
set { | ||
this.codebaseField = value; | ||
} | ||
} | ||
|
||
/// <remarks/> | ||
[System.Xml.Serialization.XmlAttributeAttribute()] | ||
public string configuration { | ||
get { | ||
return this.configurationField; | ||
} | ||
set { | ||
this.configurationField = value; | ||
} | ||
} | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
SemanticData/SolutionConfiguration/Serialization/UAModelDesignerSolution.xsd
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 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
<xs:element name="UAModelDesignerSolution"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element minOccurs="0" maxOccurs="1" name="Name" type="xs:string" /> | ||
<xs:element minOccurs="0" maxOccurs="1" name="Projects" type="ArrayOfUAModelDesignerProject" /> | ||
<xs:element minOccurs="0" maxOccurs="1" name="ServerDetails"> | ||
<xs:complexType> | ||
<xs:attribute name="codebase" type="xs:string" /> | ||
<xs:attribute name="configuration" type="xs:string" /> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
<xs:complexType name="ArrayOfUAModelDesignerProject"> | ||
<xs:sequence> | ||
<xs:element minOccurs="0" maxOccurs="unbounded" name="UAModelDesignerProject"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element minOccurs="0" maxOccurs="1" name="Name" type="xs:string" /> | ||
<xs:element minOccurs="0" maxOccurs="1" name="CSVFileName" type="xs:string" /> | ||
<xs:element minOccurs="0" maxOccurs="1" name="BuildOutputDirectoryName" type="xs:string" /> | ||
<xs:element minOccurs="0" maxOccurs="1" name="FileName" type="xs:string" /> | ||
</xs:sequence> | ||
<xs:attribute name="ProjectIdentifier" type="xs:string" /> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:schema> |
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