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 2019/11/17 21:23:00 UTC

[jira] [Commented] (IGNITE-12377) .NET: Add IBinaryObjectBuilder.SetField(name, val, type) overload

    [ https://issues.apache.org/jira/browse/IGNITE-12377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16976166#comment-16976166 ] 

Pavel Tupitsyn commented on IGNITE-12377:
-----------------------------------------

TC ok: https://ci.ignite.apache.org/project/IgniteTests24Java8?branch=pull%2F7055%2Fhead&buildTypeTab=overview#all-projects

> .NET: Add IBinaryObjectBuilder.SetField(name, val, type) overload
> -----------------------------------------------------------------
>
>                 Key: IGNITE-12377
>                 URL: https://issues.apache.org/jira/browse/IGNITE-12377
>             Project: Ignite
>          Issue Type: Improvement
>          Components: platforms
>            Reporter: Pavel Tupitsyn
>            Assignee: Pavel Tupitsyn
>            Priority: Major
>              Labels: .NET
>             Fix For: 2.8
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Right now the only general-purpose overload is {{SetField<T>(string fieldName, T val)}}.
> Let's say we get name-value pairs from some other system (e.g. from Dapper - see linked user list thread), and we want to create binary objects from them.
> When we call SetField<object>, binary metadata will have Object type for all fields (type code 103), which is not good.
> The only workaround is to create a huge if-else and call proper SetXxx method depending on actual data type - bad usability.
> In fact, we can easily provide SetField(string name, object val, Type valType) overload to solve this.  Such an overload exists on Java side.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)