DataPortal Methods and DateTimeOffset Requirement #2522
-
Hi there, I am curious as to a generic way or what best practice does anyone take whilst having the need to pass a DateTimeOffset to a DataPortal method. Because this type is not serializable, my only thought is to pass a string and parse that value to a DateTimeOffset on the server. Though quite labor intensive considering an app may have these parameters littered throughout, I am hoping for maybe a different answer. The solution I mentioned also does not restrict nor accurately describe the the info needed for those/that parameter(s). What is the common practice to pass this type of information & to keep it serializable? Or is the above mentioned solution the recommended way? And if it is not in the correct format just expect a DataPortal exception? e.g.
Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There is some discussion of generalized solutions for having MobileFormatter serialize otherwise nonserializable types in this thread: #2386. For something like DateTimeOffset, it is probably worth enhancing MobileFormatter to directly understand the type so it becomes serializable via MobileFormatter. |
Beta Was this translation helpful? Give feedback.
There is some discussion of generalized solutions for having MobileFormatter serialize otherwise nonserializable types in this thread: #2386.
For something like DateTimeOffset, it is probably worth enhancing MobileFormatter to directly understand the type so it becomes serializable via MobileFormatter.