Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
renamed WireEcryptedString -> WireEncryptedString
- Loading branch information
1 parent
b539ebb
commit b2bd5b0
Showing
13 changed files
with
78 additions
and
78 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
29 changes: 0 additions & 29 deletions
29
Rhino.ServiceBus/Convertors/ThrowingWireEcryptedStringConvertor.cs
This file was deleted.
Oops, something went wrong.
29 changes: 29 additions & 0 deletions
29
Rhino.ServiceBus/Convertors/ThrowingWireEncryptedStringConvertor.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,29 @@ | ||
using System; | ||
using System.Runtime.Serialization; | ||
using System.Security; | ||
using System.Xml.Linq; | ||
using Rhino.ServiceBus.DataStructures; | ||
using Rhino.ServiceBus.Internal; | ||
|
||
namespace Rhino.ServiceBus.Convertors | ||
{ | ||
public class ThrowingWireEncryptedStringConvertor : IValueConvertor<WireEncryptedString> | ||
{ | ||
public XElement ToElement(WireEncryptedString val, Func<Type, XNamespace> getNamespace) | ||
{ | ||
throw new SecurityException( | ||
"Cannot send message containing WireEncryptedString when <security> was not properly set up"); | ||
} | ||
|
||
public WireEncryptedString FromElement(XElement element) | ||
{ | ||
var value = element.Element(XName.Get("Value", "System.String")); | ||
if(value==null) | ||
throw new SerializationException("<WireEncryptedString> did not have mandatory <Value> element"); | ||
return new WireEncryptedString | ||
{ | ||
Value = value.Value | ||
}; | ||
} | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
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,17 @@ | ||
namespace Rhino.ServiceBus.DataStructures | ||
{ | ||
public class WireEncryptedString | ||
{ | ||
public string Value { get; set; } | ||
|
||
public static implicit operator string(WireEncryptedString s) | ||
{ | ||
return s==null ? null : s.Value; | ||
} | ||
|
||
public static implicit operator WireEncryptedString(string s) | ||
{ | ||
return new WireEncryptedString {Value = s}; | ||
} | ||
} | ||
} |
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