-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
412 additions
and
26 deletions.
There are no files selected for viewing
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 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<!--To inherit the global NuGet package sources remove the <clear/> line below --> | ||
<clear /> | ||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" /> | ||
<add key="ethernaMyget" value="https://www.myget.org/F/etherna/api/v3/index.json" /> | ||
</packageSources> | ||
</configuration> |
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,114 @@ | ||
# Remove the line below if you want to inherit .editorconfig settings from higher directories | ||
root = true | ||
|
||
#### Define style #### | ||
|
||
# All files | ||
[*] | ||
indent_style = space | ||
|
||
# C# Project, JS and CSS files | ||
[*.{csproj,js,ts,css,scss}] | ||
indent_size = 2 | ||
|
||
#### Suppress warnings #### | ||
|
||
# C# files | ||
[*.cs] | ||
|
||
# CA1034: Nested types should not be visible | ||
dotnet_diagnostic.CA1034.severity = none # Asp.Net Core Pages uses nested models | ||
|
||
# CA1054: Uri parameters should not be strings | ||
dotnet_diagnostic.CA1054.severity = none # Asp.Net Core Pages uses strings natively | ||
|
||
# CA1056: Uri properties should not be strings | ||
dotnet_diagnostic.CA1056.severity = none # Asp.Net Core Pages uses strings natively | ||
|
||
# CA1303: Do not pass literals as localized parameters | ||
dotnet_diagnostic.CA1303.severity = none # Don't need translated exceptions | ||
|
||
# CA1707: Identifiers should not contain underscores | ||
dotnet_diagnostic.CA1707.severity = none # I like underscores into constants name | ||
|
||
# CA1812: Avoid uninstantiated internal classes | ||
dotnet_diagnostic.CA1812.severity = none # Doing extensive use of Dependency Injection | ||
|
||
# CA1822: Mark members as static | ||
dotnet_diagnostic.CA1822.severity = none # Don't like static members | ||
|
||
# CA2007: Consider calling ConfigureAwait on the awaited task | ||
dotnet_diagnostic.CA2007.severity = none # Not needed with .Net Core. More info https://devblogs.microsoft.com/dotnet/configureawait-faq/ | ||
|
||
# CS1591: Missing XML comment for publicly visible type or member | ||
dotnet_diagnostic.CS1591.severity = none | ||
csharp_indent_labels = one_less_than_current | ||
csharp_using_directive_placement = outside_namespace:silent | ||
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_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 | ||
[*.{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 |
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,44 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Etherna.EthernaVideoImporter.Dtos | ||
{ | ||
internal class MetadataVideoDto | ||
{ | ||
// Constructors. | ||
public MetadataVideoDto( | ||
string? batchId, | ||
string description, | ||
long duration, | ||
long createdAt, | ||
string originalQuality, | ||
string ownerAddress, | ||
IEnumerable<MetadataVideoSource> sources, | ||
SwarmImageRaw? thumbnail, | ||
string title, | ||
long? updatedAt) | ||
{ | ||
BatchId = batchId; | ||
Description = description; | ||
Duration = duration; | ||
CreatedAt = createdAt; | ||
OriginalQuality = originalQuality; | ||
OwnerAddress = ownerAddress; | ||
Sources = sources; | ||
Thumbnail = thumbnail; | ||
Title = title; | ||
UpdatedAt = updatedAt; | ||
} | ||
|
||
// Properties. | ||
public string? BatchId { get; } | ||
public string Description { get; } | ||
public long Duration { get; } | ||
public long CreatedAt { get; } | ||
public string OriginalQuality { get; } | ||
public string OwnerAddress { get; } | ||
public IEnumerable<MetadataVideoSource> Sources { get; } | ||
public SwarmImageRaw? Thumbnail { get; } | ||
public string Title { get; } | ||
public long? UpdatedAt { get; } | ||
} | ||
} |
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,24 @@ | ||
namespace Etherna.EthernaVideoImporter.Dtos | ||
{ | ||
public class MetadataVideoSource | ||
{ | ||
// Constructors. | ||
public MetadataVideoSource( | ||
int bitrate, | ||
string quality, | ||
string reference, | ||
long size) | ||
{ | ||
Bitrate = bitrate; | ||
Quality = quality; | ||
Reference = reference; | ||
Size = size; | ||
} | ||
|
||
// Properties. | ||
public int Bitrate { get; } | ||
public string Quality { get; } | ||
public string Reference { get; } | ||
public long Size { get; } | ||
} | ||
} |
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,23 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Etherna.EthernaVideoImporter.Dtos | ||
{ | ||
public class SwarmImageRaw | ||
{ | ||
// Constructors. | ||
public SwarmImageRaw( | ||
float aspectRatio, | ||
string blurhash, | ||
IReadOnlyDictionary<string, string> sources) | ||
{ | ||
AspectRatio = aspectRatio; | ||
Blurhash = blurhash; | ||
Sources = sources; | ||
} | ||
|
||
// Properties. | ||
public float AspectRatio { get; } | ||
public string Blurhash { get; } | ||
public IReadOnlyDictionary<string, string> Sources { get; } | ||
} | ||
} |
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
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,21 @@ | ||
namespace Etherna.EthernaVideoImporter.Dtos | ||
{ | ||
public class VideoDownloadInfo | ||
{ | ||
// Constructors. | ||
public VideoDownloadInfo( | ||
int bitrate, | ||
string quality, | ||
long size) | ||
{ | ||
Bitrate = bitrate; | ||
Quality = quality; | ||
Size = size; | ||
} | ||
|
||
// Properties. | ||
public int Bitrate { get; } | ||
public string Quality { get; } | ||
public long Size { get; } | ||
} | ||
} |
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
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
Oops, something went wrong.