-
Notifications
You must be signed in to change notification settings - Fork 648
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'hotfix-3.3.11' into support-3.3
- Loading branch information
Showing
15 changed files
with
651 additions
and
11 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
Binary file modified
BIN
+94 Bytes
(110%)
src/impl/encryption/NServiceBus.Encryption.Rijndael.Config/Properties/AssemblyInfo.cs
Binary file not shown.
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
35 changes: 35 additions & 0 deletions
35
src/impl/encryption/NServiceBus.Encryption.Rijndael.Config/RijndaelExpiredKey.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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System; | ||
using System.Configuration; | ||
|
||
namespace NServiceBus.Config | ||
{ | ||
/// <summary> | ||
/// A configuration element representing a Rijndael encryption key. | ||
/// </summary> | ||
public class RijndaelExpiredKey : ConfigurationElement, IComparable<RijndaelExpiredKey> | ||
{ | ||
|
||
/// <summary> | ||
/// The keys value. | ||
/// </summary> | ||
[ConfigurationProperty("Key", IsRequired = true)] | ||
public string Key | ||
{ | ||
get | ||
{ | ||
return (string)this["Key"]; | ||
} | ||
set | ||
{ | ||
this["Key"] = value; | ||
} | ||
} | ||
|
||
|
||
int IComparable<RijndaelExpiredKey>.CompareTo(RijndaelExpiredKey other) | ||
{ | ||
return String.Compare(Key, other.Key, StringComparison.Ordinal); | ||
} | ||
|
||
} | ||
} |
148 changes: 148 additions & 0 deletions
148
src/impl/encryption/NServiceBus.Encryption.Rijndael.Config/RijndaelExpiredKeyCollection.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 |
---|---|---|
@@ -0,0 +1,148 @@ | ||
using System; | ||
using System.Configuration; | ||
|
||
namespace NServiceBus.Config | ||
{ | ||
/// <summary> | ||
/// A configuration element collection of <see cref="RijndaelExpiredKey"/>s. | ||
/// </summary> | ||
public class RijndaelExpiredKeyCollection : ConfigurationElementCollection | ||
{ | ||
/// <summary> | ||
/// Returns AddRemoveClearMap. | ||
/// </summary> | ||
public override ConfigurationElementCollectionType CollectionType | ||
{ | ||
get | ||
{ | ||
return ConfigurationElementCollectionType.AddRemoveClearMap; | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Creates a new <see cref="RijndaelExpiredKey"/>. | ||
/// </summary> | ||
protected override ConfigurationElement CreateNewElement() | ||
{ | ||
return new RijndaelExpiredKey(); | ||
} | ||
|
||
/// <summary> | ||
/// Creates a new <see cref="RijndaelExpiredKey"/>, setting its <see cref="RijndaelExpiredKey.Key"/> property to the given value. | ||
/// </summary> | ||
protected override ConfigurationElement CreateNewElement(string elementName) | ||
{ | ||
return new RijndaelExpiredKey | ||
{ | ||
Key = elementName | ||
}; | ||
} | ||
|
||
/// <summary> | ||
/// Returns the Messages property of the given <see cref="RijndaelExpiredKey"/> element. | ||
/// </summary> | ||
protected override Object GetElementKey(ConfigurationElement element) | ||
{ | ||
var encryptionKey = (RijndaelExpiredKey)element; | ||
|
||
return encryptionKey.Key; | ||
} | ||
|
||
/// <summary> | ||
/// Gets/sets the <see cref="RijndaelExpiredKey"/> at the given index. | ||
/// </summary> | ||
public RijndaelExpiredKey this[int index] | ||
{ | ||
get | ||
{ | ||
return (RijndaelExpiredKey)BaseGet(index); | ||
} | ||
set | ||
{ | ||
if (BaseGet(index) != null) | ||
{ | ||
BaseRemoveAt(index); | ||
} | ||
BaseAdd(index, value); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Gets the <see cref="RijndaelExpiredKey"/> for the given key. | ||
/// </summary> | ||
new public RijndaelExpiredKey this[string key] | ||
{ | ||
get | ||
{ | ||
return (RijndaelExpiredKey)BaseGet(key); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Calls BaseIndexOf on the given <see cref="RijndaelExpiredKey"/>. | ||
/// </summary> | ||
public int IndexOf(RijndaelExpiredKey encryptionKey) | ||
{ | ||
return BaseIndexOf(encryptionKey); | ||
} | ||
|
||
/// <summary> | ||
/// Calls BaseAdd. | ||
/// </summary> | ||
public void Add(RijndaelExpiredKey encryptionKey) | ||
{ | ||
BaseAdd(encryptionKey); | ||
} | ||
|
||
/// <summary> | ||
/// Calls BaseAdd with true as the additional parameter. | ||
/// </summary> | ||
protected override void BaseAdd(ConfigurationElement element) | ||
{ | ||
BaseAdd(element, true); | ||
} | ||
|
||
/// <summary> | ||
/// If the key exists, calls BaseRemove on it. | ||
/// </summary> | ||
public void Remove(RijndaelExpiredKey encryptionKey) | ||
{ | ||
if (BaseIndexOf(encryptionKey) >= 0) | ||
{ | ||
BaseRemove(encryptionKey.Key); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Calls BaseRemoveAt. | ||
/// </summary> | ||
public void RemoveAt(int index) | ||
{ | ||
BaseRemoveAt(index); | ||
} | ||
|
||
/// <summary> | ||
/// Calls BaseRemove. | ||
/// </summary> | ||
public void Remove(string name) | ||
{ | ||
BaseRemove(name); | ||
} | ||
|
||
/// <summary> | ||
/// Calls BaseClear. | ||
/// </summary> | ||
public void Clear() | ||
{ | ||
BaseClear(); | ||
} | ||
|
||
/// <summary> | ||
/// True if the collection is readonly | ||
/// </summary> | ||
public override bool IsReadOnly() | ||
{ | ||
return false; | ||
} | ||
} | ||
} |
Oops, something went wrong.