You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Pavel Tupitsyn (JIRA)" <ji...@apache.org> on 2017/04/18 10:09:42 UTC
[jira] [Updated] (IGNITE-3102) .NET: Call user-defined constructor
for IBinarizable objects
[ https://issues.apache.org/jira/browse/IGNITE-3102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Tupitsyn updated IGNITE-3102:
-----------------------------------
Fix Version/s: (was: 2.0)
2.1
> .NET: Call user-defined constructor for IBinarizable objects
> ------------------------------------------------------------
>
> Key: IGNITE-3102
> URL: https://issues.apache.org/jira/browse/IGNITE-3102
> Project: Ignite
> Issue Type: Improvement
> Components: platforms
> Reporter: Pavel Tupitsyn
> Labels: .net
> Fix For: 2.1
>
>
> Currently we create user objects with FormatterServices.GetUninitializedObject and then call user-defined IBinarizable.ReadBinary method.
> This is not convenient both for us and the user:
> * FormatterServices.GetUninitializedObject is not a clean way of constructing objects
> * User-defined constructor does not get called
> * User types can't have readonly fields
> For example, ISerializable mechanism does not have Read method; it calls user-defined constructor instead. We should provide similar mechanism.
> * To maintain compatibility, we may have to introduce a new interface with a single Write method, and call user-defined ctor on read.
> * Another option is to introduce a [BinarizableInit] attribute. User can place it on a constructor, and Ignite will call it, injecting Reader and Ignite instances to parameters (if there are any).
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)