-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTemplateSpec.cs
More file actions
60 lines (53 loc) · 1.79 KB
/
TemplateSpec.cs
File metadata and controls
60 lines (53 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
using System.Collections.Generic;
namespace T4SQL
{
public class TemplateSpec
{
public class TemplatePropertySpec : TemplateContext.TemplateProperty
{
public string Description { get; set; }
public short SortOrder { get; set; }
public TemplatePropertySpec(string defaultValue, string linkState, string description, short sortOrder)
: base(defaultValue, linkState)
{
Description = description;
SortOrder = sortOrder;
}
}
private readonly Dictionary<string, TemplatePropertySpec> _Properties;
public Dictionary<string, TemplatePropertySpec> Properties
{
get { return _Properties; }
}
private short _Property_Order;
public TemplateSpec()
{
_Properties = new Dictionary<string, TemplatePropertySpec>();
_Property_Order = 0;
}
public void AddProperty(string propertyName, string defaultValue, string linkState, string description)
{
_Properties.Add(propertyName, new TemplatePropertySpec(defaultValue, linkState, description, ++_Property_Order));
}
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Copyright 2013 Abel Cheng
// This source code is subject to terms and conditions of the Apache License, Version 2.0.
// See http://www.apache.org/licenses/LICENSE-2.0.
// All other rights reserved.
// You must not remove this notice, or any other, from this software.
//
// Original Author: Abel Cheng <abelcys@gmail.com>
// Created Date: May 01, 2013, 08:56:25 AM
// Primary Host: http://t4sql.codeplex.com
// Change Log:
// Author Date Comment
//
//
//
//
// (Keep code clean rather than complicated code plus long comments.)
//
////////////////////////////////////////////////////////////////////////////////////////////////////