Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lets stick with default configuration, no need to specify it every ti…
…me a fingerprint/query command is created. This is easier to follow approach.
- Loading branch information
1 parent
1ceaf65
commit 145055e
Showing
18 changed files
with
73 additions
and
127 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
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
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
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
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
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
51 changes: 1 addition & 50 deletions
51
src/SoundFingerprinting/Configuration/CustomQueryConfiguration.cs
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 |
---|---|---|
@@ -1,56 +1,7 @@ | ||
namespace SoundFingerprinting.Configuration | ||
{ | ||
using System; | ||
|
||
public class CustomQueryConfiguration : DefaultQueryConfiguration | ||
{ | ||
public new int ThresholdVotes | ||
{ | ||
get | ||
{ | ||
return base.ThresholdVotes; | ||
} | ||
|
||
set | ||
{ | ||
if (value < 0) | ||
{ | ||
throw new ArgumentException("ThresholdVotes cannot be less than 0", "value"); | ||
} | ||
|
||
base.ThresholdVotes = value; | ||
} | ||
} | ||
|
||
public new int MaximumNumberOfTracksToReturnAsResult | ||
{ | ||
get | ||
{ | ||
return base.MaximumNumberOfTracksToReturnAsResult; | ||
} | ||
|
||
set | ||
{ | ||
if (value <= 0) | ||
{ | ||
throw new ArgumentException("MaximumNumberOfTracksToReturnAsResult cannot be less or equal to 0", "value"); | ||
} | ||
|
||
base.MaximumNumberOfTracksToReturnAsResult = value; | ||
} | ||
} | ||
|
||
public new string TrackGroupId | ||
{ | ||
get | ||
{ | ||
return base.TrackGroupId; | ||
} | ||
|
||
set | ||
{ | ||
base.TrackGroupId = value; | ||
} | ||
} | ||
// marker class | ||
} | ||
} |
8 changes: 1 addition & 7 deletions
8
src/SoundFingerprinting/Configuration/DefaultQueryConfiguration.cs
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 |
---|---|---|
@@ -1,18 +1,12 @@ | ||
namespace SoundFingerprinting.Configuration | ||
{ | ||
public class DefaultQueryConfiguration : IQueryConfiguration | ||
public class DefaultQueryConfiguration : QueryConfiguration | ||
{ | ||
public DefaultQueryConfiguration() | ||
{ | ||
ThresholdVotes = 5; | ||
MaximumNumberOfTracksToReturnAsResult = 25; | ||
TrackGroupId = string.Empty; | ||
} | ||
|
||
public int ThresholdVotes { get; protected set; } | ||
|
||
public int MaximumNumberOfTracksToReturnAsResult { get; protected set; } | ||
|
||
public string TrackGroupId { get; protected set; } | ||
} | ||
} |
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.