Skip to content

Commit 925837f

Browse files
committed
Initial checkin of the SDK solution
1 parent 12daa7f commit 925837f

File tree

463 files changed

+56874
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

463 files changed

+56874
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
5+
</startup>
6+
</configuration>
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{7E4829A4-6F4D-437D-B8E1-8F8495EB57AC}</ProjectGuid>
8+
<OutputType>Exe</OutputType>
9+
<RootNamespace>CfxPackager</RootNamespace>
10+
<AssemblyName>CfxPackager</AssemblyName>
11+
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14+
<Deterministic>true</Deterministic>
15+
<SccProjectName>SAK</SccProjectName>
16+
<SccLocalPath>SAK</SccLocalPath>
17+
<SccAuxPath>SAK</SccAuxPath>
18+
<SccProvider>SAK</SccProvider>
19+
<TargetFrameworkProfile />
20+
</PropertyGroup>
21+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
22+
<PlatformTarget>AnyCPU</PlatformTarget>
23+
<DebugSymbols>true</DebugSymbols>
24+
<DebugType>full</DebugType>
25+
<Optimize>false</Optimize>
26+
<OutputPath>bin\Debug\</OutputPath>
27+
<DefineConstants>DEBUG;TRACE</DefineConstants>
28+
<ErrorReport>prompt</ErrorReport>
29+
<WarningLevel>4</WarningLevel>
30+
<DocumentationFile>
31+
</DocumentationFile>
32+
</PropertyGroup>
33+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
34+
<PlatformTarget>AnyCPU</PlatformTarget>
35+
<DebugType>pdbonly</DebugType>
36+
<Optimize>true</Optimize>
37+
<OutputPath>bin\Release\</OutputPath>
38+
<DefineConstants>TRACE</DefineConstants>
39+
<ErrorReport>prompt</ErrorReport>
40+
<WarningLevel>4</WarningLevel>
41+
</PropertyGroup>
42+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Setup|AnyCPU'">
43+
<OutputPath>bin\Setup\</OutputPath>
44+
<DefineConstants>TRACE</DefineConstants>
45+
<Optimize>true</Optimize>
46+
<DebugType>pdbonly</DebugType>
47+
<PlatformTarget>AnyCPU</PlatformTarget>
48+
<ErrorReport>prompt</ErrorReport>
49+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
50+
<Prefer32Bit>true</Prefer32Bit>
51+
</PropertyGroup>
52+
<ItemGroup>
53+
<Reference Include="System" />
54+
<Reference Include="System.Core" />
55+
<Reference Include="System.Xml.Linq" />
56+
<Reference Include="System.Data.DataSetExtensions" />
57+
<Reference Include="Microsoft.CSharp" />
58+
<Reference Include="System.Data" />
59+
<Reference Include="System.Net.Http" />
60+
<Reference Include="System.Xml" />
61+
</ItemGroup>
62+
<ItemGroup>
63+
<Compile Include="Program.cs" />
64+
<Compile Include="Properties\AssemblyInfo.cs" />
65+
</ItemGroup>
66+
<ItemGroup>
67+
<None Include="App.config" />
68+
</ItemGroup>
69+
<ItemGroup>
70+
<PackageReference Include="System.Collections.Immutable" Version="1.5.0" />
71+
<ProjectReference Include="..\CodeFactory.DotNet\CodeFactory.DotNet.csproj">
72+
<Project>{661e6004-c585-45ab-8c40-5a1b826f6490}</Project>
73+
<Name>CodeFactory.DotNet</Name>
74+
</ProjectReference>
75+
<ProjectReference Include="..\CodeFactory.Logging\CodeFactory.Logging.csproj">
76+
<Project>{c0cbdd09-b55d-4572-9f4d-d0e6dd8c4a73}</Project>
77+
<Name>CodeFactory.Logging</Name>
78+
</ProjectReference>
79+
<ProjectReference Include="..\CodeFactory.VisualStudio.Configuration\CodeFactory.VisualStudio.Configuration.csproj">
80+
<Project>{a6eb6ee0-b2f9-4412-8f43-92595fa1fa57}</Project>
81+
<Name>CodeFactory.VisualStudio.Configuration</Name>
82+
</ProjectReference>
83+
<ProjectReference Include="..\CodeFactory.VisualStudio\CodeFactory.VisualStudio.csproj">
84+
<Project>{b0e14e33-e53e-4f45-81cb-363a92b26b3b}</Project>
85+
<Name>CodeFactory.VisualStudio</Name>
86+
</ProjectReference>
87+
<ProjectReference Include="..\CodeFactory\CodeFactory.csproj">
88+
<Project>{d73c2a8f-64a2-4713-9a23-03c10b888877}</Project>
89+
<Name>CodeFactory</Name>
90+
</ProjectReference>
91+
</ItemGroup>
92+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
93+
</Project>
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
//*****************************************************************************
2+
//* Code Factory SDK
3+
//* Copyright (c) 2020 CodeFactory, LLC
4+
//*****************************************************************************
5+
using System;
6+
using System.Diagnostics;
7+
using System.IO;
8+
using System.Linq;
9+
using System.Reflection;
10+
using CodeFactory.VisualStudio.Configuration;
11+
12+
namespace CfxPackager
13+
{
14+
/// <summary>
15+
/// Console application that builds the package used by the code factory runtime.
16+
/// </summary>
17+
class Program
18+
{
19+
private static readonly int SUCCESS = 0;
20+
21+
private static readonly int FAILED = 1;
22+
23+
static void Main(string[] args)
24+
{
25+
string version = "1.0";
26+
try
27+
{
28+
var assembly = Assembly.GetExecutingAssembly();
29+
var versionInfo = FileVersionInfo.GetVersionInfo(assembly.Location);
30+
31+
version = versionInfo.FileVersion;
32+
}
33+
catch (Exception)
34+
{
35+
Console.WriteLine("Failed to load the system version information. Cannot create the cfx file.");
36+
Environment.ExitCode = FAILED;
37+
return;
38+
}
39+
40+
Console.WriteLine($"Code Factory Packager Version - {version}");
41+
42+
if (args == null)
43+
{
44+
Console.WriteLine("The assembly path was not provided, cannot create the CFX file.");
45+
Environment.ExitCode = FAILED;
46+
return;
47+
}
48+
49+
var filePath = args.FirstOrDefault();
50+
51+
if (string.IsNullOrEmpty(filePath))
52+
{
53+
Console.WriteLine($"The assembly '{filePath}' could not be found, cannot create the CFX file.");
54+
Environment.ExitCode = FAILED;
55+
return;
56+
}
57+
58+
if (!File.Exists(filePath))
59+
{
60+
Environment.ExitCode = FAILED;
61+
}
62+
63+
bool result = false;
64+
try
65+
{
66+
Console.WriteLine($"Creating a package file for the assembly '{filePath}'.");
67+
result = ConfigManager.CreateDefaultPackage(filePath);
68+
69+
if (result)
70+
Console.WriteLine(
71+
$"Successfully create the code factory package {Path.GetFileNameWithoutExtension(filePath)}.cfx");
72+
else
73+
Console.Write("An error occured and the code factory package could not be completed.");
74+
}
75+
catch (Exception unhandledError)
76+
{
77+
Console.WriteLine(unhandledError);
78+
throw;
79+
}
80+
81+
Environment.ExitCode = result ? SUCCESS : FAILED;
82+
}
83+
}
84+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("CfxPackager")]
9+
[assembly: AssemblyDescription("Code factory packaging utility.")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("2019 CodeFactory LLC")]
12+
[assembly: AssemblyProduct("CfxPackager")]
13+
[assembly: AssemblyCopyright("Copyright © 2020 CodeFactory LLC")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("7e4829a4-6f4d-437d-b8e1-8f8495eb57ac")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.20230.1")]
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
//*****************************************************************************
2+
//* Code Factory SDK
3+
//* Copyright (c) 2020 CodeFactory, LLC
4+
//*****************************************************************************
5+
6+
namespace CodeFactory.DotNet
7+
{
8+
/// <summary>
9+
/// Enumeration that determines the type of attribute parameter data that is being returned.
10+
/// </summary>
11+
public enum AttributeParameterKind
12+
{
13+
/// <summary>
14+
/// Is a simple value.
15+
/// </summary>
16+
Value = 0,
17+
18+
/// <summary>
19+
/// Is a target named type.
20+
/// </summary>
21+
Type = 1,
22+
23+
/// <summary>
24+
/// Is an enumeration item.
25+
/// </summary>
26+
Enum = 2,
27+
28+
/// <summary>
29+
/// Is an array of multiple parameter values.
30+
/// </summary>
31+
Array = 3,
32+
33+
/// <summary>
34+
/// The return data is unknown.
35+
/// </summary>
36+
Unknown = 9999
37+
}
38+
}

0 commit comments

Comments
 (0)