Bend.PipeHdfContext.setQualifier C# (CSharp) Method

setQualifier() public method

public setQualifier ( string field, QualifierBase qualifier ) : void
field string
qualifier QualifierBase
return void
        public void setQualifier(string field,QualifierBase qualifier)
        {
            fields[field] = qualifier;
        }

Same methods

PipeHdfContext::setQualifier ( string field, string exact_value ) : void

Usage Example

Example #1
0
        public void T03_PipeStages()
        {
            // setup the pipe...
            PipeStagePartition p =
                new PipeStagePartition("username",
                    new PipeStagePartition("tablename",
                        new PipeStageEnd()
                    )
                );

            // setup the HDF context
            PipeHdfContext ctx = new PipeHdfContext();
            ctx.setQualifier("username", "jeske");

            {
                bool err = false;
                // process the HDF context, should be an error because "table" doesn't exist..
                try {
                    p.generateRowFromContext(ctx);
                } catch (PipeGenerateException) {
                    err = true;
                }
                Assert.AreEqual(true, err, "error on pipe element not in context");
            }

            // add the "tablename" key
            ctx.setQualifier("tablename", "foo");

            // process the HDF context, should be an error because "table" doesn't exist..
            PipeRowQualifier newrow = p.generateRowFromContext(ctx);

            // test the key produced
            Assert.AreEqual("/=jeske/=foo", newrow.ToString());
        }
All Usage Examples Of Bend.PipeHdfContext::setQualifier