~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Factories/SectionFactory.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
 
3
 
 
4
using System;
 
5
using System.Reflection;
 
6
        
 
7
/// <summary>
 
8
/// Factory for ReportSections
 
9
/// </summary>
 
10
/// <remarks>
 
11
///     created by - Forstmeier Peter
 
12
///     created on - 01.09.2005 17:05:03
 
13
/// </remarks>
 
14
namespace ICSharpCode.Reports.Core
 
15
{
 
16
        internal sealed class SectionFactory
 
17
        {
 
18
                private SectionFactory ()
 
19
                {
 
20
                        
 
21
                }
 
22
                public static BaseSection Create(string name) {
 
23
                        if (String.IsNullOrEmpty(name)) {
 
24
                                String str = String.Format(System.Globalization.CultureInfo.CurrentCulture,
 
25
                                                           "<{0}>",name);
 
26
                                throw new UnknownItemException(str);
 
27
                        }
 
28
                        return new BaseSection(name);
 
29
                }
 
30
                
 
31
        }
 
32
}