Exemple #1
0
 // Sometimes most/all of the property values are already known.  This constructor allows them to be quickly set.
 public _TemplateSummary(_TemplateSummary summary)
 {
     Filename     = summary.Filename;
     Revision     = summary.Revision;
     PollSummary  = summary.PollSummary;
     NumQuestions = summary.NumQuestions;
     PollGuid     = summary.PollGuid;
     LastEditGuid = summary.LastEditGuid;
 }
        // Searches the Template Summaries in the collection for one with the specified filename.
        // Returns 'true' if found, 'false' otherwise.
        public bool ContainsFilename(string filename)
        {
            for (int i = 0; i < List.Count; i++)
            {
                _TemplateSummary summary = (_TemplateSummary)List[i];
                if (summary.Filename == filename)
                {
                    return(true);
                }
            }

            return(false); // If reaches here then a entry with the specified filename was not found
        }
        // Searches the Template Summaries in the collection for an object with the specified filename.
        // Returns the Summary object if it finds it, otherwise 'null'.
        public _TemplateSummary Find_Template(string filename)
        {
            for (int i = 0; i < List.Count; i++)
            {
                _TemplateSummary summary = (_TemplateSummary)List[i];
                if (summary.Filename == filename)
                {
                    return(summary);
                }
            }

            return(null); // If reaches here then a Summary object with the specified filename was not found
        }
 // Returns the index position that the 'value' occupies in the collection.
 public int IndexOf(_TemplateSummary value)
 {
     return(base.IndexOf(value));
 }
 public bool Contains(_TemplateSummary value)
 {
     return(base.Contains(value));
 }
 public void Remove(_TemplateSummary value)
 {
     base.Remove(value);
 }
 public void Insert(int index, _TemplateSummary value)
 {
     base.Insert(index, value);
 }
        public int Add(_TemplateSummary value)
        {
            int index = base.Add(value);

            return(index);
        }