-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Extract StreamedParameterCollection - Implement StreamCollection reading - Adapt tests References #8
- Loading branch information
1 parent
72aec27
commit 09fb6d2
Showing
10 changed files
with
244 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
// <copyright>Copyright 2012-2015 Lawo AG (http://www.lawo.com).</copyright> | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
|
||
namespace Lawo.EmberPlusSharp.Model | ||
{ | ||
using System.Collections.Generic; | ||
|
||
internal sealed class StreamedParameterCollection : | ||
Dictionary<int, IEnumerable<IStreamedParameter>>, IStreamedParameterCollection | ||
{ | ||
void IStreamedParameterCollection.Add(IStreamedParameter parameter) | ||
{ | ||
var streamIdentifier = (int)parameter.StreamIdentifier; | ||
IEnumerable<IStreamedParameter> group; | ||
|
||
if (!this.TryGetValue(streamIdentifier, out group)) | ||
{ | ||
group = new HashSet<IStreamedParameter>(); | ||
this.Add(streamIdentifier, group); | ||
} | ||
|
||
((HashSet<IStreamedParameter>)group).Add(parameter); | ||
} | ||
} | ||
} |
Oops, something went wrong.