- mailtemplate.zip
- MailTemplate
- MailTemplate.Repository
- MailTemplate.sln
- MailTemplate.snk
- MailTemplate.T4
- MailTemplate
- Features
- Feature
- Layouts
- MailTemplate
- SharePointProjectItem.spdata
- MailTemplate.csproj
- MailTemplate.csproj.user
- MailTemplate.snk
- MailTemplate
- MailTemplates
- Package
- Properties
|
//
// Parago Media GmbH & Co. KG, Jürgen Bäurle (jbaurle@parago.de)
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
<#@ template language="C#v3.5" debug="true" hostspecific="true" #>
<#@ assembly name="System.Core" #>
<#@ assembly name="System.Xml" #>
<#@ assembly name="System.Xml.Linq" #>
<#@ assembly name="EnvDTE" #>
<#@ assembly name="Microsoft.SharePoint" #>
<#@ assembly name="$(SolutionDir)MailTemplate.T4\bin\MailTemplate.T4.dll" #>
<#@ import namespace="EnvDTE" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ import namespace="System.IO" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Xml" #>
<#@ import namespace="System.Xml.Linq" #>
<#@ import namespace="System.Xml.Schema" #>
<#@ import namespace="Microsoft.SharePoint.Utilities" #>
<#@ import namespace="Parago.SharePoint.Samples" #>
<#
//System.Diagnostics.Debugger.Launch();
//System.Diagnostics.Debugger.Break();
var fileNames = new string[] { "MailTemplateContentType.xml" };
var listName = "MailTemplates";
var th = new TemplateHelper((IServiceProvider)Host, Host.TemplateFile);
var rootNamespace = th.GetRootNamespace();
var project = th.GetContainingProject(fileNames[0]);
var files = th.GetProjectItems(project, fileNames);
var contenTypes = files.Select(f => th.GetContentTypeInfo(f.get_FileNames(0)));
#>
// Auto-Generated: <#= DateTime.Now #>
using System;
using System.Runtime.CompilerServices;
using Microsoft.SharePoint;
namespace <#= rootNamespace #>
{
<#
foreach(var contenType in contenTypes)
{
var contentTypeName = th.ConvertNameToValidIdentifier(contenType.Name);
#>
[CompilerGenerated]
public partial class <#= contentTypeName #>
{
<#
foreach(var field in contenType.Fields)
{
var typeName = th.GetCSharpTypeName(field.Type);
#>
[FieldID("<#= field.ID #>")] public <#= typeName #> <#= field.Name #> { get; set; }
<#
}
#>
protected override string AssociatedList { get { return Lists.<#= listName #>; } }
protected override SPContentTypeId AssociatedContentTypeID { get { return ContentTypes.<#= contentTypeName #>.ID; } }
}
<#
}
#>
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.