Updates referencesource to .NET 4.7
[mono.git] / mcs / class / referencesource / System.Xml / System / Xml / Xslt / XsltSettings.cs
1 //------------------------------------------------------------------------------
2 // <copyright file="XsltSettings.cs" company="Microsoft">
3 //     Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 // <owner current="true" primary="true">Microsoft</owner>
6 // <spec>http://webdata/xml/specs/XslCompiledTransform.xml</spec>
7 //------------------------------------------------------------------------------
8
9 using System.CodeDom.Compiler;
10
11 namespace System.Xml.Xsl {
12     public sealed class XsltSettings {
13         private bool enableDocumentFunction;
14         private bool enableScript;
15         private bool checkOnly;
16         private bool includeDebugInformation;
17         private int  warningLevel = -1;     // -1 means not set
18         private bool treatWarningsAsErrors;
19 #if !DISABLE_XSLT_COMPILER
20         private TempFileCollection tempFiles;
21 #endif
22
23         public XsltSettings() { }
24
25         public XsltSettings(bool enableDocumentFunction, bool enableScript) {
26             this.enableDocumentFunction = enableDocumentFunction;
27             this.enableScript           = enableScript;
28         }
29
30         public static XsltSettings Default {
31             get { return new XsltSettings(false, false); }
32         }
33
34         public static XsltSettings TrustedXslt {
35             get { return new XsltSettings(true, true); }
36         }
37
38         public bool EnableDocumentFunction {
39             get { return enableDocumentFunction;  }
40             set { enableDocumentFunction = value; }
41         }
42
43         public bool EnableScript {
44             get { return enableScript;  }
45             set { enableScript = value; }
46         }
47
48         internal bool CheckOnly {
49             get { return checkOnly;  }
50             set { checkOnly = value; }
51         }
52
53         internal bool IncludeDebugInformation {
54             get { return includeDebugInformation;  }
55             set { includeDebugInformation = value; }
56         }
57
58         internal int WarningLevel {
59             get { return warningLevel;  }
60             set { warningLevel = value; }
61         }
62
63         internal bool TreatWarningsAsErrors {
64             get { return treatWarningsAsErrors;  }
65             set { treatWarningsAsErrors = value; }
66         }
67
68 #if !DISABLE_XSLT_COMPILER
69         internal TempFileCollection TempFiles {
70             get { return tempFiles;  }
71             set { tempFiles = value; }
72         }
73 #endif
74     }
75 }