-
Notifications
You must be signed in to change notification settings - Fork 50
/
GlassHeader.tt
70 lines (54 loc) · 2.06 KB
/
GlassHeader.tt
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
61
62
63
64
65
66
67
68
69
70
<#@ template language="C#" #>
<#@ assembly name="System.Core" #>
<#@ include file="Helpers.tt" #>
<#@ include file="StringExtensions.tt" #>
<#@ include file="GeneralExtensions.tt" #>
<#@ include file="Inflector.tt" #>
<#@ import namespace="System" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ import namespace="HedgehogDevelopment.SitecoreProject.VSIP.CodeGeneration.Models" #>
<#@ parameter name="Model" type="HedgehogDevelopment.SitecoreProject.VSIP.CodeGeneration.Models.ProjectHeader" #>
<#@ parameter name="DefaultNamespace" type="System.String" #>
#pragma warning disable 1591
#pragma warning disable 0108
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Team Development for Sitecore.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Glass.Sitecore.Mapper.Configuration.Attributes;
using Glass.Sitecore.Mapper.Configuration;
using Glass.Sitecore.Mapper.FieldTypes;
using Sitecore.Globalization;
<#
// Calculate the top leve namespace as configured in the target project and
// base namespace as defined in the TDS project
string fullNamespace = JoinNamespaces(DefaultNamespace, Model.BaseNamespace);
#>
namespace <#=fullNamespace #>
{
public interface IGlassBase{
[SitecoreId]
Guid Id{ get; }
[SitecoreInfo(SitecoreInfoType.Language)]
Language Language{ get; }
[SitecoreInfo(SitecoreInfoType.Version)]
int Version { get; }
}
public abstract class GlassBase : IGlassBase{
[SitecoreId]
public virtual Guid Id{ get; private set;}
[SitecoreInfo(SitecoreInfoType.Language)]
public virtual Language Language{ get; private set; }
[SitecoreInfo(SitecoreInfoType.Version)]
public virtual int Version { get; private set; }
}
}