public BlogPost(BlogPostContent content, Author author, Category category) { Date = DateTime.Now; Content = content ?? throw new ArgumentNullException(nameof(content)); Author = author ?? throw new ArgumentNullException(nameof(author)); Tags = new BlogPostTagCollection(); ExternalLinks = new ExternalLinkCollection(); MetaTags = new MetaTagCollection(); Category = category ?? throw new ArgumentNullException(nameof(category)); }
public static void Run() { // ExStart:CheckHiddenExternalLinks // The path to the documents directory. string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); // Loads the workbook which contains hidden external links Workbook workbook = new Workbook(dataDir + "sample.xlsx"); // Access the external link collection of the workbook ExternalLinkCollection links = workbook.Worksheets.ExternalLinks; // Print all the external links and check there IsVisible property for (int i = 0; i < links.Count; i++) { Console.WriteLine("Data Source: " + links[i].DataSource); Console.WriteLine("Is Referred: " + links[i].IsReferred); Console.WriteLine("Is Visible: " + links[i].IsVisible); Console.WriteLine(); } // ExEnd:CheckHiddenExternalLinks }
public static void Run() { //Source directory string sourceDir = RunExamples.Get_SourceDirectory(); // Loads the workbook which contains hidden external links Workbook workbook = new Workbook(sourceDir + "sampleCheckHiddenExternalLinks.xlsx"); // Access the external link collection of the workbook ExternalLinkCollection links = workbook.Worksheets.ExternalLinks; // Print all the external links and check there IsVisible property for (int i = 0; i < links.Count; i++) { Console.WriteLine("Data Source: " + links[i].DataSource); Console.WriteLine("Is Referred: " + links[i].IsReferred); Console.WriteLine("Is Visible: " + links[i].IsVisible); Console.WriteLine(); } Console.WriteLine("CheckHiddenExternalLinks executed successfully."); }
private BlogPost() { Tags = new BlogPostTagCollection(); ExternalLinks = new ExternalLinkCollection(); MetaTags = new MetaTagCollection(); }
public ExternalLinkCollectionTests() { _collection = new ExternalLinkCollection(); }