public void FixedSrcBuilder_ThrowsException_when_not_full() { bool caught = false; try { var b1 = new VA.ShapeSheet.Streams.SrcStreamArrayBuilder(1); var s1 = b1.ToStreamArray(); } catch (System.ArgumentException e) { caught = true; } if (!caught) { Assert.Fail("Did not catch expected exception"); } var b2 = new VA.ShapeSheet.Streams.SidSrcStreamArrayBuilder(1); var src = new Src((short)0, (short)0, (short)0); var sidsrc = new SidSrc((short)0, src); b2.Add(sidsrc); var s2 = b2.ToStreamArray(); }
private VisioAutomation.ShapeSheet.Streams.StreamArray buildstream_src(WriteCache <Src> wcs) { var builder = new VisioAutomation.ShapeSheet.Streams.SrcStreamArrayBuilder(wcs.Count); builder.AddRange(wcs.EnumCoords()); return(builder.ToStreamArray()); }
private Streams.StreamArray _build_src_stream() { int dummy_shapeid = -1; int numshapes = 1; int numcells = this._get_total_cell_count(numshapes); var stream = new VisioAutomation.ShapeSheet.Streams.SrcStreamArrayBuilder(numcells); var cellinfos = this._enum_total_cellinfo(dummy_shapeid); var srcs = cellinfos.Select(i => i.SidSrc.Src); stream.AddRange(srcs); return(stream.ToStreamArray()); }