Skip to content

Commit

Permalink
Removed unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
JunaMeinhold committed Apr 25, 2024
1 parent 7719a06 commit bda16bc
Show file tree
Hide file tree
Showing 103 changed files with 106 additions and 779 deletions.
89 changes: 88 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,91 @@
dotnet_diagnostic.CS1591.severity = silent

# IDE0065: Misplaced using directive
csharp_using_directive_placement = outside_namespace
csharp_using_directive_placement = outside_namespace:silent
csharp_indent_labels = one_less_than_current
csharp_prefer_simple_using_statement = true:suggestion
csharp_prefer_braces = true:silent
csharp_style_namespace_declarations = block_scoped:silent
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_prefer_primary_constructors = true:suggestion
csharp_style_expression_bodied_methods = false:silent
csharp_style_expression_bodied_constructors = false:silent
csharp_style_expression_bodied_operators = false:silent
csharp_style_expression_bodied_properties = true:silent
csharp_style_expression_bodied_indexers = true:silent
csharp_style_expression_bodied_accessors = true:silent
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent
csharp_style_throw_expression = true:suggestion
csharp_style_prefer_null_check_over_type_check = true:suggestion
csharp_prefer_simple_default_expression = true:suggestion
csharp_style_prefer_local_over_anonymous_function = true:suggestion

[*.{cs,vb}]
#### Naming styles ####

# Naming rules

dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i

dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case

dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case

# Symbol specifications

dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interface.required_modifiers =

dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types.required_modifiers =

dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =

# Naming styles

dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 4
indent_size = 4
end_of_line = crlf
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_auto_properties = true:silent
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
dotnet_style_prefer_conditional_expression_over_return = true:silent
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_compound_assignment = true:suggestion
dotnet_style_prefer_simplified_interpolation = true:suggestion
dotnet_style_prefer_collection_expression = when_types_loosely_match:suggestion
dotnet_style_namespace_match_folder = true:suggestion
6 changes: 0 additions & 6 deletions HexaEngine.Core/Assets/ThumbnailCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -923,12 +923,6 @@ protected virtual void Dispose(bool disposing)
}
}

~ThumbnailCache()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Dispose(disposing: false);
}

/// <summary>
/// Disposes of the resources used by the <see cref="ThumbnailCache"/>.
/// </summary>
Expand Down
6 changes: 0 additions & 6 deletions HexaEngine.Core/Debugging/DebugDrawCommandList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,6 @@ protected virtual void Dispose(bool disposing)
}
}

~DebugDrawCommandList()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Dispose(disposing: false);
}

public void Dispose()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Expand Down
9 changes: 0 additions & 9 deletions HexaEngine.Core/Debugging/FileLogWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,6 @@ protected virtual void Dispose(bool disposing)
}
}

/// <summary>
/// Finalizes an instance of the <see cref="FileLogWriter"/> class.
/// </summary>
~FileLogWriter()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Dispose(disposing: false);
}

/// <summary>
/// Releases the resources used by the <see cref="FileLogWriter"/> instance.
/// </summary>
Expand Down
6 changes: 0 additions & 6 deletions HexaEngine.Core/DisposableBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ protected virtual void Dispose(bool disposing)

protected abstract void DisposeCore();

~DisposableBase()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Dispose(disposing: false);
}

public void Dispose()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Expand Down
9 changes: 0 additions & 9 deletions HexaEngine.Core/Graphics/Buffers/DrawIndirectArgsBuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -376,15 +376,6 @@ protected virtual void Dispose(bool disposing)
}
}

/// <summary>
/// Finalizes an instance of the <see cref="DrawIndirectArgsBuffer{T}"/> class.
/// </summary>
~DrawIndirectArgsBuffer()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Dispose(disposing: false);
}

/// <summary>
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
/// </summary>
Expand Down
9 changes: 0 additions & 9 deletions HexaEngine.Core/Graphics/Buffers/DrawIndirectArgsUavBuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -460,15 +460,6 @@ protected virtual void Dispose(bool disposing)
}
}

/// <summary>
/// Finalizes an instance of the <see cref="DrawIndirectArgsUavBuffer{T}"/> class.
/// </summary>
~DrawIndirectArgsUavBuffer()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Dispose(disposing: false);
}

/// <summary>
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
/// </summary>
Expand Down
9 changes: 0 additions & 9 deletions HexaEngine.Core/Graphics/Buffers/StructuredBuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -379,15 +379,6 @@ protected virtual void Dispose(bool disposing)
}
}

/// <summary>
/// Finalizes the structured buffer instance by releasing resources.
/// </summary>
~StructuredBuffer()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Dispose(disposing: false);
}

/// <summary>
/// Releases the resources held by the structured buffer.
/// </summary>
Expand Down
9 changes: 0 additions & 9 deletions HexaEngine.Core/Graphics/Buffers/StructuredUavBuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -566,15 +566,6 @@ protected virtual void Dispose(bool disposing)
}
}

/// <summary>
/// Finalizes the object and releases resources if not already disposed.
/// </summary>
~StructuredUavBuffer()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Dispose(disposing: false);
}

/// <summary>
/// Disposes of the buffer and associated resources, suppressing finalization.
/// </summary>
Expand Down
18 changes: 0 additions & 18 deletions HexaEngine.Core/Graphics/Buffers/UavBuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,6 @@ protected virtual void Dispose(bool disposing)
}
}

/// <summary>
/// Finalizes an instance of the <see cref="UavBuffer"/> class.
/// </summary>
~UavBuffer()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Dispose(disposing: false);
}

/// <summary>
/// Releases the resources held by the buffer.
/// </summary>
Expand Down Expand Up @@ -926,15 +917,6 @@ protected virtual void Dispose(bool disposing)
}
}

/// <summary>
/// Releases the resources used by the <see cref="UavBuffer{T}"/>.
/// </summary>
~UavBuffer()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Dispose(disposing: false);
}

/// <summary>
/// Releases the resources used by the <see cref="UavBuffer{T}"/>.
/// </summary>
Expand Down
9 changes: 0 additions & 9 deletions HexaEngine.Core/Graphics/DepthStencil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -674,15 +674,6 @@ protected virtual void Dispose(bool disposing)
}
}

/// <summary>
/// Finalizes this instance of <see cref="DepthStencil"/>.
/// </summary>
/// <returns></returns>
~DepthStencil()
{
Dispose(disposing: false);
}

/// <inheritdoc/>
public void Dispose()
{
Expand Down
9 changes: 0 additions & 9 deletions HexaEngine.Core/Graphics/GBuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,6 @@ protected virtual void Dispose(bool disposing)
}
}

/// <summary>
/// Finalizes an instance of the <see cref="GBuffer"/> class.
/// </summary>
~GBuffer()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Dispose(disposing: false);
}

/// <summary>
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
/// </summary>
Expand Down
9 changes: 0 additions & 9 deletions HexaEngine.Core/Graphics/Primitives/Primitive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,6 @@ protected virtual void Dispose(bool disposing)
}
}

/// <summary>
/// Finalizes an instance of the <see cref="Primitive{Tvertex, Tindex}"/> class.
/// </summary>
~Primitive()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Dispose(disposing: false);
}

/// <inheritdoc/>
public void Dispose()
{
Expand Down
9 changes: 0 additions & 9 deletions HexaEngine.Core/Graphics/Primitives/Quad.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,6 @@ private void Dispose(bool disposing)
}
}

/// <summary>
/// Finalizes an instance of the <see cref="Quad"/> class.
/// </summary>
~Quad()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Dispose(disposing: false);
}

/// <inheritdoc/>
public void Dispose()
{
Expand Down
18 changes: 0 additions & 18 deletions HexaEngine.Core/Graphics/RenderTargetArray.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,6 @@ protected virtual void Dispose(bool disposing)
}
}

/// <summary>
/// Finalizes this instance of <see cref="RenderTargetViewArray"/>.
/// </summary>
~RenderTargetViewArray()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Dispose(disposing: false);
}

/// <summary>
/// Releases the resources used by the <see cref="RenderTargetViewArray"/>.
/// </summary>
Expand Down Expand Up @@ -211,15 +202,6 @@ protected virtual void Dispose(bool disposing)
}
}

/// <summary>
/// Finalizes this instance of <see cref="ShaderResourceViewArray"/>.
/// </summary>
~ShaderResourceViewArray()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Dispose(disposing: false);
}

/// <summary>
/// Releases the resources used by the <see cref="ShaderResourceViewArray"/>.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@ protected virtual void Dispose(bool disposing)
}
}

~ShaderReflection()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Dispose(disposing: false);
}

public void Dispose()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Expand Down
10 changes: 1 addition & 9 deletions HexaEngine.Core/IO/Asset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public void RemoveRef()
/// <summary>
/// Releases the resources used by the <see cref="Asset"/> instance and removes references.
/// </summary>
/// <param name="disposing">A flag indicating whether the method is being called from the explicit method.</param>
/// <param name="disposing">A flag indicating whether the method is being called from the explicit method.</param>
protected virtual void Dispose(bool disposing)
{
if (!disposedValue)
Expand Down Expand Up @@ -281,13 +281,5 @@ public void Dispose()
Dispose(true);
GC.SuppressFinalize(this);
}

/// <summary>
/// Finalizes an instance of the <see cref="Asset"/> class.
/// </summary>
~Asset()
{
Dispose(false);
}
}
}
9 changes: 0 additions & 9 deletions HexaEngine.Core/IO/Binary/Textures/Raw/RawImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -295,15 +295,6 @@ protected virtual void Dispose(bool disposing)
}
}

/// <summary>
/// Finalizes an instance of the <see cref="RawImage"/> class.
/// </summary>
~RawImage()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Dispose(disposing: false);
}

/// <summary>
/// Releases the resources used by the <see cref="RawImage"/> instance.
/// </summary>
Expand Down
Loading

0 comments on commit bda16bc

Please sign in to comment.