Exemplo n.º 1
0
 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));
 }
Exemplo n.º 2
0
        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
        }
Exemplo n.º 3
0
        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.");
        }
Exemplo n.º 4
0
 private BlogPost()
 {
     Tags          = new BlogPostTagCollection();
     ExternalLinks = new ExternalLinkCollection();
     MetaTags      = new MetaTagCollection();
 }
Exemplo n.º 5
0
 public ExternalLinkCollectionTests()
 {
     _collection = new ExternalLinkCollection();
 }