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