Skip to content

Commit

Permalink
Upgrade version with new core
Browse files Browse the repository at this point in the history
  • Loading branch information
José Torres committed Sep 5, 2018
1 parent ac8080c commit ac8f3ab
Show file tree
Hide file tree
Showing 397 changed files with 13,513 additions and 5,971 deletions.
Binary file modified IngeniBridge.Programs/.vs/IngeniBridge.Programs/v15/.suo
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,103 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.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')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{AE86E05C-9343-4972-9E4F-C023C27F4E65}</ProjectGuid>
<TargetFramework>net45</TargetFramework>
<Title>IngeniBridge.GenerateFullInventory</Title>
<Version>1.0.0</Version>
<Authors>JTO Tec</Authors>
<Copyright>Copyright © DEAGITAL 2016</Copyright>
<Description></Description>
<Company>DEAGITAL</Company>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>IngeniBridge.GenerateFullInventory</RootNamespace>
<AssemblyName>IngeniBridge.GenerateFullInventory</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<TargetFrameworkProfile />
</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="CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=de6f01bd326f8c32, processorArchitecture=MSIL">
<HintPath>..\packages\CommandLineParser20.2.0.0.0\lib\net40\CommandLine.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="EPPlus, Version=4.5.2.1, Culture=neutral, PublicKeyToken=ea159fdaa78159a1, processorArchitecture=MSIL">
<HintPath>..\packages\EPPlus.4.5.2.1\lib\net40\EPPlus.dll</HintPath>
</Reference>
<Reference Include="IngeniBridge.Core, Version=1.0.36.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\IngeniBridge.Core.1.0.36\lib\net461\IngeniBridge.Core.dll</HintPath>
</Reference>
<Reference Include="IngeniBridge.StorageAccessor.InMemory, Version=1.0.6.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\IngeniBridge.StorageAccessor.InMemory.1.0.6\lib\net461\IngeniBridge.StorageAccessor.InMemory.dll</HintPath>
</Reference>
<Reference Include="IngeniBridge.Utils, Version=1.0.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\IngeniBridge.Utils.1.0.3\lib\net452\IngeniBridge.Utils.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="JT.TechCases.Threading, Version=1.0.11.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\JT.TechCases.Threading.1.0.11\lib\net45\JT.TechCases.Threading.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Security" />
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>


<ItemGroup>
<Compile Include="CommandLineOptions.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="WorksheetInfo.cs" />
<PackageReference Include="CommandLineParser" Version="2.3.0" />
<PackageReference Include="IngeniBridge.BuildUtils" Version="1.0.6" />
<PackageReference Include="IngeniBridge.Core" Version="1.0.37" />
<PackageReference Include="IngeniBridge.StorageAccessor.InMemory" Version="1.0.8" />
<PackageReference Include="JT.TechCases.Threading" Version="1.0.12" />
<PackageReference Include="log4net" Version="2.0.8" /> <PackageReference Include="System.Net.Http" Version="4.3.3" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="LaunchOnMyCompanyDb.cmd" />
<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>
-->

<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' ">
<DefineConstants>NET45;NETFULL</DefineConstants>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
rem dont forget to rename ibdb file in the command line
bin\Release\IngeniBridge.GenerateFullInventory --StorageAccessorAssembly="IngeniBridge.StorageAccessor.InMemory.dll" --IBDatabase=..\..\IngeniBridge.Sample.MyCompany\IngeniBridge.Samples.MyCompany\MasterAssetMyCompany_2018_08_25.ibdb --InventoryFile=InventoryFileIB.xlsx
bin\Release\IngeniBridge.GenerateFullInventory --StorageAccessorAssembly="IngeniBridge.StorageAccessor.InMemory.dll" --IBDatabase=..\..\IngeniBridge.Sample.MyCompany\IngeniBridge.Samples.MyCompany\MasterAssetMyCompany_2018_09_05.ibdb --InventoryFile=InventoryFileIB.xlsx
pause
35 changes: 21 additions & 14 deletions IngeniBridge.Programs/IngeniBridge.GenerateFullInventory/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
using IngeniBridge.Core.Diags;
using IngeniBridge.Core.Inventory;
using IngeniBridge.Core.Storage;
using log4net.Config;
using System.Diagnostics;

namespace IngeniBridge.GenerateFullInventory
{
Expand All @@ -18,28 +20,33 @@ class Program
private static readonly ILog log = LogManager.GetLogger ( System.Reflection.MethodBase.GetCurrentMethod ().DeclaringType );
static int Main ( string [] args )
{
int ret = 0;
log4net.Config.XmlConfigurator.Configure ();
int exitCode = 0;
XmlConfigurator.Configure ( LogManager.GetRepository ( Assembly.GetEntryAssembly () ), new FileInfo ( "log4net.config" ) );
CommandLineOptions options = null;
ParserResult<CommandLineOptions> result = CommandLine.Parser.Default.ParseArguments<CommandLineOptions> ( args );
if ( result.Errors.Any () )
result.WithNotParsed<CommandLineOptions> ( ( errs ) =>
{
ret = 1;
return ( ret );
}
errs.All ( err => { log.FatalFormat ( err.ToString () ); return ( true ); } );
exitCode = 1;
} );
if ( exitCode != 0 ) return ( exitCode );
result.WithParsed<CommandLineOptions> ( opts => { options = opts; } );
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo ( Assembly.GetEntryAssembly ().Location );
Console.WriteLine ( fvi.ProductName + " v" + fvi.FileVersion + "\n" + fvi.LegalCopyright );
log.Info ( "Starting " + Assembly.GetEntryAssembly ().GetName ().Name + " v" + Assembly.GetEntryAssembly ().GetName ().Version );
log.Info ( "StorageAccessorAssembly => " + result.Value.StorageAccessorAssembly );
log.Info ( "IBDatabase => " + result.Value.IBDatabase );
log.Info ( "InventoryFile => " + result.Value.InventoryFile );
log.Info ( "StorageAccessorAssembly => " + options.StorageAccessorAssembly );
log.Info ( "IBDatabase => " + options.IBDatabase );
log.Info ( "InventoryFile => " + options.InventoryFile );
try
{
#region init IngeniBridge
UriBuilder uri = new UriBuilder ( Assembly.GetExecutingAssembly ().CodeBase );
string path = Path.GetDirectoryName ( Uri.UnescapeDataString ( uri.Path ) );
Assembly accessorasm = Assembly.LoadFile ( path + "\\" + result.Value.StorageAccessorAssembly );
Assembly accessorasm = Assembly.LoadFile ( path + "\\" + options.StorageAccessorAssembly );
Core.Storage.StorageAccessor accessor = Core.Storage.StorageAccessor.InstantiateFromAccessorAssembly ( accessorasm );
AssetExtension.StorageAccessor = accessor;
TimedDataExtension.StorageAccessor = accessor;
accessor.OpenDB ( result.Value.IBDatabase );
accessor.OpenDB ( options.IBDatabase );
#endregion
log.Info ( "DataModel Name => " + accessor.Version.Name );
log.Info ( "DataModel Date => " + accessor.Version.Generated.ToString () );
Expand All @@ -49,7 +56,7 @@ static int Main ( string [] args )
TreeChecker tc = new TreeChecker ( accessor );
Console.WriteLine ( "Vérification de l'arbre..." );
tc.CheckTree ( true, message => log.Error ( message ) );
FileInfo fi = new FileInfo ( result.Value.InventoryFile );
FileInfo fi = new FileInfo ( options.InventoryFile );
if ( fi.Exists ) fi.Delete ();
ExcelPackage xlMatricesPatrimoines = new ExcelPackage ( fi );
Dictionary<string, WorksheetInfo> worksheetinfos = new Dictionary<string, WorksheetInfo> ();
Expand Down Expand Up @@ -97,9 +104,9 @@ static int Main ( string [] args )
log.Error ( ex );
Console.WriteLine ( ex.Message );
log.Error ( "Terminé FAILED." );
ret = 1;
exitCode = 1;
}
return ( ret );
return ( exitCode );

}
}
Expand Down

This file was deleted.

Binary file not shown.
Loading

0 comments on commit ac8f3ab

Please sign in to comment.