private static void TestSilverlightWPF(BuildDocumenter documenter, TestOptions options, ReferenceEngineSettings engineSettings) { if (tocType == CustomTocType.ReferenceRoot) { return; } // Decide which Caliburn Micro library to include: Silverlight or WPF bool useSilverlight = true; string libraryDir = Path.Combine(sampleDir, @"SampleLibrary\"); if (useSilverlight) { string outputDir = Path.Combine(libraryDir, @"Libraries\Caliburn.Micro\Silverlight\"); //string projectDoc = Path.Combine(outputDir, "Project.xml"); ReferenceGroup apiGroup = new ReferenceGroup( "Test Silverlight 4", Guid.NewGuid().ToString()); apiGroup.RunningHeaderText = "Sandcastle Helpers: Test Silverlight 4.0"; //apiGroup.RootTopicId = "d36e744f-c053-4e94-9ac9-b1ee054d8de1"; apiGroup.SyntaxType |= BuildSyntaxType.Xaml; apiGroup.EnableXmlnsForXaml = true; if (engineSettings.RootNamespaceContainer) { apiGroup.RootNamespaceTitle = "Caliburn Micro for Silverlight 4.0 v1.0 RTW"; } ReferenceContent apiContent = apiGroup.Content; apiContent.FrameworkType = BuildFrameworkType.Silverlight40; //apiGroup.AddItem(projectDoc, null); //apiContent.AddItem(Path.Combine(outputDir, "Caliburn.Micro.xml"), // Path.Combine(outputDir, "Caliburn.Micro.dll")); ReferenceItem refItem = new ReferenceItem( Path.Combine(outputDir, "Caliburn.Micro.xml"), Path.Combine(outputDir, "Caliburn.Micro.dll")); //refItem.XamlSyntax = true; apiContent.Add(refItem); //apiContent.AddDependency(Path.Combine(outputDir, "System.Windows.Interactivity.dll")); documenter.AddGroup(apiGroup); } else { string outputDir = Path.Combine(libraryDir, @"Libraries\Caliburn.Micro\WPF\"); //string projectDoc = Path.Combine(outputDir, "Project.xml"); ReferenceGroup apiGroup = new ReferenceGroup( "Test WPF .NET 4", Guid.NewGuid().ToString()); apiGroup.RunningHeaderText = "Sandcastle Helpers: Test .NET Framework 4.0"; //apiGroup.RootTopicId = "d36e744f-c053-4e94-9ac9-b1ee054d8de1"; apiGroup.SyntaxType |= BuildSyntaxType.Xaml; apiGroup.EnableXmlnsForXaml = true; if (engineSettings.RootNamespaceContainer) { apiGroup.RootNamespaceTitle = "Caliburn Micro for WPF 4.0 v1.0 RTW"; } ReferenceContent apiContent = apiGroup.Content; apiContent.FrameworkType = BuildFrameworkType.Framework40; //apiGroup.AddItem(projectDoc, null); //apiContent.AddItem(Path.Combine(outputDir, "Caliburn.Micro.xml"), // Path.Combine(outputDir, "Caliburn.Micro.dll")); ReferenceItem refItem = new ReferenceItem( Path.Combine(outputDir, "Caliburn.Micro.xml"), Path.Combine(outputDir, "Caliburn.Micro.dll")); //refItem.XamlSyntax = true; apiContent.Add(refItem); //apiContent.AddDependency(Path.Combine(outputDir, "System.Windows.Interactivity.dll")); documenter.AddGroup(apiGroup); } }
private static void TestRedirection(BuildDocumenter documenter, TestOptions options, ReferenceEngineSettings engineSettings) { if (tocType == CustomTocType.ReferenceRoot) { return; } string libraryDir = Path.Combine(sampleDir, @"SampleLibrary\Libraries\"); string outputDir = Path.Combine(libraryDir, @"Redirects\"); string projectDoc = Path.Combine(outputDir, "Project.xml"); ReferenceGroup apiGroup = new ReferenceGroup( "Testing Redirection", Guid.NewGuid().ToString()); apiGroup.RunningHeaderText = "Sandcastle Helpers: Testing Assembly Redirection"; apiGroup.SyntaxType |= BuildSyntaxType.Xaml; apiGroup.EnableXmlnsForXaml = true; apiGroup.VersionType = ReferenceVersionType.Assembly; if (engineSettings.RootNamespaceContainer) { apiGroup.RootNamespaceTitle = "Testing Assembly Redirection"; } ReferenceContent apiContent = apiGroup.Content; apiContent.FrameworkType = BuildFrameworkType.Framework40; apiContent.AddItem(projectDoc, null); ReferenceItem refItem = new ReferenceItem( Path.Combine(outputDir, "Tests.Drawings.xml"), Path.Combine(outputDir, "Tests.Drawings.dll")); //refItem.XamlSyntax = true; apiContent.Add(refItem); //apiContent.AddDependency(Path.Combine(outputDir, "Tests.Shapes.dll")); //apiContent.AddDependency(Path.Combine(outputDir, "Tests.Geometries.dll")); documenter.AddGroup(apiGroup); // Testing embedded documents... //apiGroup = new ReferenceGroup( // "Testing Embeddeding", Guid.NewGuid().ToString()); //apiGroup.ExcludeToc = true; //NOTE!!! //apiGroup.RunningHeaderText = "Sandcastle Helpers: Testing Assembly Redirection"; //apiGroup.SyntaxType |= BuildSyntaxType.Xaml; //apiGroup.EnableXmlnsForXaml = true; //apiGroup.VersionType = ReferenceVersionType.Assembly; //if (engineSettings.RootNamespaceContainer) //{ // apiGroup.RootNamespaceTitle = "Testing Assembly Redirection"; //} //apiContent = apiGroup.Content; //apiContent.FrameworkType = BuildFrameworkType.Framework40; //apiContent.AddItem(projectDoc, null); //apiContent.AddItem(projectDoc, null); //refItem = new ReferenceItem( // Path.Combine(outputDir, "Tests.Shapes.xml"), // Path.Combine(outputDir, "Tests.Shapes.dll")); //refItem.XamlSyntax = true; //apiContent.Add(refItem); //refItem = new ReferenceItem( // Path.Combine(outputDir, "Tests.Geometries.xml"), // Path.Combine(outputDir, "Tests.Geometries.dll")); //refItem.XamlSyntax = true; //apiContent.Add(refItem); //documenter.AddGroup(apiGroup); ReferenceLinkSource linkSource = new ReferenceLinkSource(); refItem = new ReferenceItem(projectDoc, null); //refItem.XamlSyntax = true; linkSource.Add(refItem); refItem = new ReferenceItem( Path.Combine(outputDir, "Tests.Shapes.xml"), Path.Combine(outputDir, "Tests.Shapes.dll")); //refItem.XamlSyntax = true; linkSource.Add(refItem); refItem = new ReferenceItem( Path.Combine(outputDir, "Tests.Geometries.xml"), Path.Combine(outputDir, "Tests.Geometries.dll")); //refItem.XamlSyntax = true; linkSource.Add(refItem); engineSettings.AddLinkSource(linkSource); }