about us      downloads      documentation      contact      home 
 products
 antHR
 workflow studio
 technical toolkits
 content entry
 workflow
 security
 hierarchy
 concepts
 how tos
 reference
 FAQs
previous: Summary  next: Markup class for content entry

How to: Content entry attributes - Build the class

  Step 1 : Summary
  Step 2 : Build the class
  Step 3 : Markup class for content entry
  Step 4 : Test editing the class
  Step 5 : Marking the class for storage
  Step 6 : Being flexible in storage

Build a simple class with a few properties - (page 2 of 6)

Level: developer

Make a new executable, and add references to
Ant.ContentEntry.dll, Ant.ContentEntry.Windows.dll, Ant.ContentEntry.Web.dll,     
Ant.ContentEntry.Types.dll, Ant.Database.dll, Ant.Licensing and Ant.Security.dll


Start a new class in the executable then add the following code:
using System;

namespace HowTos
{
    /// <summary>class representing a television programme</summary>
    public class TelevisionProgramme
    {
        string programmeName;
        int channel;
        DateTime start;
        int duration;
        /// <summary>Default constructor required by content entry</summary>
        public TelevisionProgramme()
        {
        }
        /// <summary>Gets and sets the name of the television programme</summary>
        public string ProgrammeName 
        {
            get 
            {
                return programmeName;
            } 
            set 
            {
                programmeName = value;
            }
        }
        /// <summary>Gets and sets the channel that the programme is on</summary>
        public int Channel 
        {
            get {
                return channel;
            } 
            set 
            {
                channel = value;
            }
        }
        /// <summary>Start time of the programme</summary>
        public DateTime Start 
        {
            get 
            {
                return start;
            } 
            set 
            {
                start = value;
            }
        }
        /// <summary>Duration of the programme</summary>
        public int Duration 
        {
            get 
            {
                return duration;
            } 
            set 
            {
                duration = value;
            }
        }
    }
}



 

Did you find this article helpful? Comments on this page are welcome and can only help us improve the quality of our documentation.
© Ant Organisation Ltd, 2003