-
Notifications
You must be signed in to change notification settings - Fork 0
/
SPExpressionBuilderConfigModifications.cs
44 lines (39 loc) · 1.76 KB
/
SPExpressionBuilderConfigModifications.cs
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Phoenix.WebConfig;
using Microsoft.SharePoint.Administration;
namespace Phoenix.SPExpressionBuilder
{
// <configuration>
//<system.web>
//<compilation>
//<expressionBuilders>
//<add expressionPrefix="WSSUrl"
//type="{your Namespace}.WSSUrlExpressionBuilder,{Assembly Name}"/>
//</expressionBuilders>
//</compilation>
//</system.web>
//</configuration>
//_modifications.Add(CreateModification("Microsoft.Dynamics",
// "configuration", "Microsoft.Dynamics",
// SPWebConfigModification.SPWebConfigModificationType.EnsureSection, _owner));
public class SPExpressionBuilderConfigModifications : WebConfigModificationHandler
{
private string _owner = "SPExpressionBuilder";
public SPExpressionBuilderConfigModifications()
{
_modifications.Add(CreateModification("compilation",
"configuration/system.web", "compilation",
SPWebConfigModification.SPWebConfigModificationType.EnsureSection, _owner));
_modifications.Add(CreateModification("expressionBuilders",
"configuration/system.web/compilation", "expressionBuilders",
SPWebConfigModification.SPWebConfigModificationType.EnsureSection, _owner));
_modifications.Add(CreateModification("add[@expressionPrefix='SPUrl']",
"configuration/system.web/compilation/expressionBuilders",
@"<add expressionPrefix='SPUrl' type='Phoenix.SPExpressionBuilder.SPUrlExpressionBuilder,Phoenix.SPExpressionBuilder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3bf50d67de4343b0' />",
SPWebConfigModification.SPWebConfigModificationType.EnsureChildNode, _owner));
}
}
}