Error in patch for Regex in BsonWriter

Mar 21, 2010 at 11:18 AM

Hi,

The implementation had one error in the BsonWriter.WriteRegex-method. Forgot the AutoComplete-call. It should be:

 

public virtual void WriteRegex(string expression, string option) //sedanwer
    {
        AutoComplete(JsonToken.Undefined);
        var token = new JRegexValue(expression, option);
        AddValue(token, JsonToken.Regex);
    }

//Daniel

 

 

public virtual void WriteRegex(string expression, string option) //sedanwer
    {
        AutoComplete(JsonToken.Undefined);
        var token = new JRegexValue(expression, option);
        AddValue(token, JsonToken.Regex);
    }