Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 38aeb2bd authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

Merge pull request #43 in VECTO/vecto-sim from...

Merge pull request #43 in VECTO/vecto-sim from ~EMQUARIMA/vecto-sim:feature/VECTO-87-use-uniform-code-formatting to develop

* commit 'c4eca885':
  modified code formatting settings (spaces inside array initializer)
  reformatting code using resharper
  applied ReSharper code formatting to VectoCore
  applied ReSharper code formatting with new settings on Test Project
  adding ReSharper config-file for c# code formatting
parents 946e67d8 c4eca885
No related branches found
No related tags found
No related merge requests found
Showing
with 116 additions and 121 deletions
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ANONYMOUS_METHOD_DECLARATION_BRACES/@EntryValue">END_OF_LINE</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/CASE_BLOCK_BRACES/@EntryValue">END_OF_LINE</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/EMPTY_BLOCK_STYLE/@EntryValue">TOGETHER_SAME_LINE</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/FORCE_FIXED_BRACES_STYLE/@EntryValue">ALWAYS_ADD</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/FORCE_FOR_BRACES_STYLE/@EntryValue">ALWAYS_ADD</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/FORCE_FOREACH_BRACES_STYLE/@EntryValue">ALWAYS_ADD</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/FORCE_IFELSE_BRACES_STYLE/@EntryValue">ALWAYS_ADD</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/FORCE_USING_BRACES_STYLE/@EntryValue">ALWAYS_ADD</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/FORCE_WHILE_BRACES_STYLE/@EntryValue">ALWAYS_ADD</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INITIALIZER_BRACES/@EntryValue">END_OF_LINE</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/OTHER_BRACES/@EntryValue">END_OF_LINE</s:String>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_CATCH_ON_NEW_LINE/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_ELSE_ON_NEW_LINE/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_FINALLY_ON_NEW_LINE/@EntryValue">False</s:Boolean>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SIMPLE_EMBEDDED_STATEMENT_STYLE/@EntryValue">LINE_BREAK</s:String>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AROUND_MULTIPLICATIVE_OP/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_WITHIN_SINGLE_LINE_ARRAY_INITIALIZER_BRACES/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=2BF7A1E51991F2458D2D1F0B29CF888B/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=2BF7A1E51991F2458D2D1F0B29CF888B/AbsolutePath/@EntryValue">C:\Workspaces\VisualStudio\VECTO_quam\VECTO.sln.DotSettings</s:String>
<s:Boolean x:Key="/Default/Environment/InjectedLayers/InjectedLayerCustomization/=File2BF7A1E51991F2458D2D1F0B29CF888B/@KeyIndexDefined">True</s:Boolean>
<s:Double x:Key="/Default/Environment/InjectedLayers/InjectedLayerCustomization/=File2BF7A1E51991F2458D2D1F0B29CF888B/RelativePriority/@EntryValue">1</s:Double></wpf:ResourceDictionary>
\ No newline at end of file
......@@ -2,41 +2,41 @@
namespace TUGraz.VectoCore.Exceptions
{
public class VectoException : Exception
{
public VectoException(string message) : base(message) { }
public VectoException(string message, Exception innerException) : base(message, innerException) { }
}
public class VectoException : Exception
{
public VectoException(string message) : base(message) {}
public VectoException(string message, Exception innerException) : base(message, innerException) {}
}
public abstract class FileIOException : VectoException
{
protected FileIOException(string message) : base(message) { }
protected FileIOException(string message, Exception inner) : base(message, inner) { }
}
public abstract class FileIOException : VectoException
{
protected FileIOException(string message) : base(message) {}
protected FileIOException(string message, Exception inner) : base(message, inner) {}
}
public class InvalidFileFormatException : FileIOException
public class InvalidFileFormatException : FileIOException
{
public InvalidFileFormatException(string message) : base(message) { }
public InvalidFileFormatException(string message, Exception inner) : base(message) { }
public InvalidFileFormatException(string message) : base(message) {}
public InvalidFileFormatException(string message, Exception inner) : base(message) {}
}
/// <summary>
/// Exception which gets thrown when the version of a file is not supported.
/// Exception which gets thrown when the version of a file is not supported.
/// </summary>
public class UnsupportedFileVersionException : FileIOException
{
public UnsupportedFileVersionException(string message) : base(message) { }
public UnsupportedFileVersionException(string message, Exception inner) : base(message, inner) { }
public UnsupportedFileVersionException(string message) : base(message) {}
public UnsupportedFileVersionException(string message, Exception inner) : base(message, inner) {}
}
/// <summary>
/// Exception which gets thrown when an error occurred during read of a vecto csv-file.
/// </summary>
/// Exception which gets thrown when an error occurred during read of a vecto csv-file.
/// </summary>
public class CSVReadException : FileIOException
{
public CSVReadException(string message) : base(message) { }
public CSVReadException(string message, Exception inner) : base(message, inner) { }
}
}
{
public CSVReadException(string message) : base(message) {}
public CSVReadException(string message, Exception inner) : base(message, inner) {}
}
}
\ No newline at end of file
......@@ -4,9 +4,7 @@ namespace TUGraz.VectoCore.Exceptions
{
public class VectoSimulationException : VectoException
{
public VectoSimulationException(string msg) : base(msg) { }
public VectoSimulationException(string msg, Exception inner) : base(msg, inner) { }
public VectoSimulationException(string msg) : base(msg) {}
public VectoSimulationException(string msg, Exception inner) : base(msg, inner) {}
}
}
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
namespace TUGraz.VectoCore.Models.Connector
{
class Connector<TI, TO, TP>
internal class Connector<TI, TO, TP>
where TI : InPort, TP
where TO : OutPort, TP
{
......@@ -17,5 +17,4 @@ namespace TUGraz.VectoCore.Models.Connector
InPort.Connect(OutPort);
}
}
}
}
\ No newline at end of file
namespace TUGraz.VectoCore.Models.Connector.Ports
{
public interface IDriverDemandInPort
{
void Connect(IDriverDemandOutPort other);
}
}
public interface IDriverDemandInPort
{
void Connect(IDriverDemandOutPort other);
}
}
\ No newline at end of file
using System;
using TUGraz.VectoCore.Models.Connector.Ports.Impl;
using TUGraz.VectoCore.Utils;
namespace TUGraz.VectoCore.Models.Connector.Ports
{
public interface IDriverDemandOutPort
{
IResponse Request(TimeSpan absTime, TimeSpan dt, MeterPerSecond velocity, double gradient);
}
}
public interface IDriverDemandOutPort
{
IResponse Request(TimeSpan absTime, TimeSpan dt, MeterPerSecond velocity, double gradient);
}
}
\ No newline at end of file
namespace TUGraz.VectoCore.Models.Connector.Ports
{
public interface IDriverDemandOutProvider
{
IDriverDemandOutPort OutPort();
}
}
public interface IDriverDemandOutProvider
{
IDriverDemandOutPort OutPort();
}
}
\ No newline at end of file
namespace TUGraz.VectoCore.Models.Connector.Ports
{
public interface IInPort
{
}
public interface IInPort {}
}
\ No newline at end of file
namespace TUGraz.VectoCore.Models.Connector.Ports
{
public interface IOutPort
{
}
public interface IOutPort {}
}
\ No newline at end of file
......@@ -4,4 +4,4 @@
{
ITnOutPort OutShaft();
}
}
}
\ No newline at end of file
namespace TUGraz.VectoCore.Models.Connector.Ports
{
public interface IResponse
{
}
public interface IResponse {}
}
\ No newline at end of file
namespace TUGraz.VectoCore.Models.Connector.Ports
{
public interface ITnInPort : ITnPort, IInPort
{
void Connect(ITnOutPort other);
}
public interface ITnInPort : ITnPort, IInPort
{
void Connect(ITnOutPort other);
}
}
\ No newline at end of file
using System;
using TUGraz.VectoCore.Models.Connector.Ports.Impl;
using TUGraz.VectoCore.Utils;
namespace TUGraz.VectoCore.Models.Connector.Ports
{
public interface ITnOutPort : ITnPort, IOutPort
{
/// <summary>
/// Requests the Outport with the given torque [Nm] and angularVelocity [rad/s].
/// </summary>
/// <param name="absTime">[s]</param>
/// <param name="dt">[s]</param>
/// <param name="torque">[Nm]</param>
/// <param name="angularVelocity">[rad/s]</param>
IResponse Request(TimeSpan absTime, TimeSpan dt, NewtonMeter torque, RadianPerSecond angularVelocity);
}
public interface ITnOutPort : ITnPort, IOutPort
{
/// <summary>
/// Requests the Outport with the given torque [Nm] and angularVelocity [rad/s].
/// </summary>
/// <param name="absTime">[s]</param>
/// <param name="dt">[s]</param>
/// <param name="torque">[Nm]</param>
/// <param name="angularVelocity">[rad/s]</param>
IResponse Request(TimeSpan absTime, TimeSpan dt, NewtonMeter torque, RadianPerSecond angularVelocity);
}
}
\ No newline at end of file
namespace TUGraz.VectoCore.Models.Connector.Ports
{
public interface ITnPort
{
}
}
public interface ITnPort {}
}
\ No newline at end of file
namespace TUGraz.VectoCore.Models.Connector.Ports.Impl
{
public abstract class InPort: IInPort
public abstract class InPort : IInPort
{
public abstract void Connect(IOutPort other);
}
}
}
\ No newline at end of file
namespace TUGraz.VectoCore.Models.Connector.Ports.Impl
{
public abstract class OutPort: IOutPort
{
}
}
public abstract class OutPort : IOutPort {}
}
\ No newline at end of file
......@@ -2,21 +2,14 @@ using System;
namespace TUGraz.VectoCore.Models.Connector.Ports.Impl
{
public class ResponseCycleFinished : IResponse
{
public class ResponseCycleFinished : IResponse {}
}
public class ResponseSuccess : IResponse {}
public class ResponseSuccess : IResponse
{
}
public class ResponseFailOverload : IResponse {}
public class ResponseFailOverload : IResponse
{
}
public class ResponseFailTimeInterval : IResponse
{
public TimeSpan DeltaT { get; set; }
}
public class ResponseFailTimeInterval : IResponse
{
public TimeSpan DeltaT { get; set; }
}
}
\ No newline at end of file
namespace TUGraz.VectoCore.Models.Simulation.Cockpit
{
public interface ICockpit : IGearboxCockpit, IEngineCockpit, IVehicleCockpit
{
}
public interface ICockpit : IGearboxCockpit, IEngineCockpit, IVehicleCockpit {}
}
\ No newline at end of file
......@@ -4,9 +4,9 @@ namespace TUGraz.VectoCore.Models.Simulation.Cockpit
{
public interface IEngineCockpit
{
/// <summary>
/// [rad/s]
/// </summary>
/// <summary>
/// [rad/s]
/// </summary>
RadianPerSecond EngineSpeed();
}
}
\ No newline at end of file
namespace TUGraz.VectoCore.Models.Simulation.Data
{
public interface IModalDataWriter
{
/// <summary>
/// Indexer for fields of the DataWriter. Accesses the data of the current step.
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
object this[ModalResultField key] { get; set; }
public interface IModalDataWriter
{
/// <summary>
/// Indexer for fields of the DataWriter. Accesses the data of the current step.
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
object this[ModalResultField key] { get; set; }
/// <summary>
/// Commits the data of the current simulation step.
/// </summary>
void CommitSimulationStep();
/// <summary>
/// Commits the data of the current simulation step.
/// </summary>
void CommitSimulationStep();
void Finish();
}
}
void Finish();
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment