<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:37:08 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CSHARP-541] Make BsonClassMap&lt;TClass&gt;.MapMember Typesafe</title>
                <link>https://jira.mongodb.org/browse/CSHARP-541</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Right now the BsonClassMap&amp;lt;TClass&amp;gt;.MapMember functionality is cumbersome because the returned type is of type BsonMemberMap rather than BsonMemberMap&amp;lt;TMember&amp;gt;.  This forces the user to always recast when dealing with various BsonMemberMap Set methods.&lt;/p&gt;

&lt;p&gt;This is error prone, overly verbose, and violates the design principle of forcing the caller reprovide information that has already been specified.&lt;/p&gt;

&lt;p&gt;Consider the current situation:&lt;/p&gt;

&lt;p&gt;            BsonClassMap.RegisterClassMap&amp;lt;MyType&amp;gt;(classMap =&amp;gt;&lt;br/&gt;
            &lt;/p&gt;
{
                classMap.AutoMap();

                classMap.MapMember(myType =&amp;gt; myType.MyField)
                    .SetShouldSerializeMethod(obj =&amp;gt; !((MyType)obj).MyField != null);
            }
&lt;p&gt;);&lt;/p&gt;

&lt;p&gt;Instead it really should be:&lt;/p&gt;

&lt;p&gt;            BsonClassMap.RegisterClassMap&amp;lt;MyType&amp;gt;(classMap =&amp;gt;&lt;br/&gt;
            &lt;/p&gt;
{
                classMap.AutoMap();

                classMap.MapMember(myType =&amp;gt; myType.MyField)
                    .SetShouldSerializeMethod(myType =&amp;gt; myType.MyField != null);
            }
&lt;p&gt;);&lt;/p&gt;</description>
                <environment>All</environment>
        <key id="45666">CSHARP-541</key>
            <summary>Make BsonClassMap&lt;TClass&gt;.MapMember Typesafe</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="2">Won&apos;t Fix</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="optimiz3">Alexander Nagy</reporter>
                        <labels>
                    </labels>
                <created>Fri, 27 Jul 2012 21:05:59 +0000</created>
                <updated>Mon, 20 May 2019 14:50:12 +0000</updated>
                            <resolved>Mon, 20 May 2019 14:50:12 +0000</resolved>
                                    <version>1.5</version>
                                                    <component>Serialization</component>
                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="2252594" author="ian@10gen.com" created="Mon, 20 May 2019 14:50:12 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=optimiz3&quot; class=&quot;user-hover&quot; rel=&quot;optimiz3&quot;&gt;optimiz3&lt;/a&gt; thanks a lot for the PR and apologies for the delay in responding here.  Given that this does not add any real new functionality we don&apos;t plan to make this change.  As such closing as Won&apos;t Fix.&lt;/p&gt;</comment>
                            <comment id="148636" author="craiggwilson" created="Mon, 30 Jul 2012 12:58:09 +0000"  >&lt;p&gt;Since this is such a large and braking change, I&apos;ve assigned this to 2.0.  &lt;/p&gt;</comment>
                            <comment id="148477" author="optimiz3" created="Sat, 28 Jul 2012 23:06:27 +0000"  >&lt;p&gt;Ended up implementing this, pull request here: &lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/pull/121&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/pull/121&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsme6f:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>82194</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>