NullReferenceException when calling DeepZoomTargetFilter.write()

Mar 23, 2011 at 8:54 AM

Hi,

I am using the Pauthor.dll for the first time. This is my code :

PivotCollection pivCol = new PivotCollection();
pivCol.Name = "My Pivot Collection";
pivCol.FacetCategories.Add(new    PivotFacetCategory("FacetCategory1", PivotFacetType.String));
pivCol.FacetCategories.Add(new PivotFacetCategory("FacetCategory2", PivotFacetType.Number));
PivotItem item1 = new PivotItem("1", pivCol);
item1.Description = "This is the discription of the item 1";
item1.Name = "Item1 name";
item1.Href = "http://www.google.com";
item1.Image = new PivotImage("C:\\Users\\yaron\\Desktop\\Pics\\Pic1.jpg");
item1.AddFacetValues("FacetCategory1", "Some value");
item1.AddFacetValues("FacetCategory2", 23);
pivCol.Items.Add(item1);
PivotCollectionBuffer source = new PivotCollectionBuffer(pivCol);
LocalCxmlCollectionTarget target = new LocalCxmlCollectionTarget("C:\\Users\\yaron\\Desktop\\c1\\c1.cxml");
DeepZoomTargetFilter targetFilter = new DeepZoomTargetFilter(target);
targetFilter.Write(source);

Everything goes fine until targetFilter.Write(source) is called. I get an NullReferenceException. I also
can't see the source code or where the exception happend. If it's any help, inside the exception the Data
property says {System.Collections.ListDictionaryInternal} .

(I wrote the code in VS2010 targeting .Net 4.0. Version of Pauthor.dll is 1.2)