Skip to content

Conversation

@PlasmaIntec
Copy link
Contributor

Issue #, if available:
73

Description of changes:
Add IonClobAttribute which takes an encoding so customers can specify which string properties should be converted to an Ion Clob instead of an Ion String.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/// </summary>
///
/// <param name="encoding">Type of encoding for Clob.</param>
public IonClobSerializer(string encodingString = "Unicode")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason IonClobSerializer takes a string rather than a Encoding is because in C#, Only primitive constants or arrays of primitives can be used as attribute parameters

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we consider to use enum instead of string? and enum supports switch expression

Copy link
Contributor

@guyilin-amazon guyilin-amazon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • There are some check warnings need to be fixed
  • The specification and changelog also need to be updated

/// </summary>
///
/// <param name="encoding">Type of encoding for Clob.</param>
public IonClobSerializer(string encodingString = "Unicode")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we consider to use enum instead of string? and enum supports switch expression

* and limitations under the License.
*/

namespace Amazon.IonObjectMapper.Demo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file should be put into demo project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants