2
Vote

Can't add element constraints on startDateTimeIndex and endDateTimeIndex

description

Adding element constraints to the WitsmlQuery object does not work. For example adding constraints on startDateTimeIndex and endDateTimeIndex did not have any effect.
 
Example:
 
    [TestMethod]
    public void TestGetAllCurves()
    {
        WitsmlServer server = CreateWitsmlServer();
        WitsmlWellbore wellbore = server.getOne<WitsmlWellbore>(new WitsmlQuery(), "B-1458461", "W-1458461");
        WitsmlQuery query = new WitsmlQuery();
        query.addElementConstraint("startDateTimeIndex", "2011-05-17T12:00:00+02:00");
        query.addElementConstraint("endDateTimeIndex", "2011-05-17T12:03:00+02:00");
        query.addElementConstraint("mnemonic", "TIME");
        query.addElementConstraint("mnemonic", "GS_BPOS");
        query.addElementConstraint("mnemonic", "GS_HKLD");
        WitsmlLog log = server.getOne<WitsmlLog>(query, "L-1594991-Time", wellbore);
        foreach (var curve in log.getCurves())
        {
            Console.Out.WriteLine(curve);
            IEnumerable<string> values = curve.getValues().Select(v => { return FormatValue(v); });
            Console.Out.WriteLine(string.Join(", ", values));
        }
    }

comments