<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:37:45 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-762] BsonValue .ToString() should have an overload that accepts CultureInfo</title>
                <link>https://jira.mongodb.org/browse/CSHARP-762</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;See attached screen caps.&lt;/p&gt;

&lt;p&gt;Basically:&lt;/p&gt;

&lt;p&gt;    var s = bsonValue.ToString(CultureInfo.InvariantCulture);&lt;/p&gt;

&lt;p&gt;should be allowed, and should propagate the CultureInfo to any ToString calls made to sub-objects stringified in the process of rendering the string.&lt;/p&gt;</description>
                <environment></environment>
        <key id="79952">CSHARP-762</key>
            <summary>BsonValue .ToString() should have an overload that accepts CultureInfo</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="5" iconUrl="https://jira.mongodb.org/images/icons/priorities/trivial.svg">Trivial - P5</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="sridhar">Sridhar Nanjundeswaran</assignee>
                                    <reporter username="tanglebones">Clifford Hammerschmidt</reporter>
                        <labels>
                    </labels>
                <created>Fri, 21 Jun 2013 17:31:06 +0000</created>
                <updated>Thu, 20 Mar 2014 14:37:08 +0000</updated>
                            <resolved>Wed, 14 Aug 2013 20:00:54 +0000</resolved>
                                    <version>1.8.1</version>
                                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="402428" author="sridhar" created="Tue, 13 Aug 2013 23:54:52 +0000"  >&lt;p&gt;Additionally if you do have a use case that does need to produce culture dependent values you could use the overloads from the actual value type which can be obtained using &amp;lt;bsonval&amp;gt;.value. e.g. &lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;var bsonInt = new BsonInt32(1000);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;var str1 = bsonInt.ToString();   &amp;lt;--- Invariant string&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;var str2 = bsonInt.Value.ToString(&quot;C&quot;, new CultureInfo(&quot;en-us&quot;).NumberFormat);    &amp;lt;---- Culture dependent formatting to currency&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</comment>
                            <comment id="369195" author="rstam" created="Thu, 27 Jun 2013 17:44:43 +0000"  >&lt;p&gt;All BsonValue subtypes already override ToString to produce values that are not culture dependent. All BsonValue ToString results are either based on XmlConvert or on custom implementations of ToString.&lt;/p&gt;

&lt;p&gt;Since the values are already not culture dependent, there doesn&apos;t seem to be a need for calling ToString with CultureInfo.Invariant. Is there a use case for an overload of ToString that produces culture dependent values?&lt;/p&gt;</comment>
                            <comment id="369183" author="rstam" created="Thu, 27 Jun 2013 17:29:30 +0000"  >&lt;p&gt;The type of the parameter should probably be IFormatProvider, not CultureInfo.&lt;/p&gt;</comment>
                            <comment id="365189" author="tanglebones" created="Fri, 21 Jun 2013 19:41:20 +0000"  >&lt;p&gt;That&apos;s the only place I&apos;ve seen it.&lt;/p&gt;</comment>
                            <comment id="365160" author="craiggwilson" created="Fri, 21 Jun 2013 19:01:42 +0000"  >&lt;p&gt;Thanks for the report.  I&apos;ve assigned this for a fix in 1.9.  I&apos;m sure there are a number of other places care might need to be given to culture.  Have you noticed anywhere else?&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="28159" name="bsondocumenttostringerror.png" size="26832" author="tanglebones" created="Fri, 21 Jun 2013 17:31:06 +0000"/>
                            <attachment id="28158" name="bsondocumenttostringrsharp.png" size="12263" author="tanglebones" created="Fri, 21 Jun 2013 17:31:06 +0000"/>
                    </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|hrre47:</customfieldvalue>

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