10 namespace SiliconStudio.
Paradox.ProjectGenerator
14 using System.Collections.Generic;
21 #line 1 "C:\Dev\Paradox\sources\tools\SiliconStudio.Paradox.ProjectGenerator\ResharperDotSettings.tt"
22 [global::System.CodeDom.Compiler.GeneratedCodeAttribute(
"Microsoft.VisualStudio.TextTemplating",
"12.0.0.0")]
23 public partial
class ResharperDotSettings : ResharperDotSettingsBase
31 this.Write(
@"<wpf:ResourceDictionary xml:space=""preserve"" xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"" xmlns:s=""clr-namespace:System;assembly=mscorlib"" xmlns:ss=""urn:shemas-jetbrains-com:settings-storage-xaml"" xmlns:wpf=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"">
32 <s:String x:Key=""/Default/Environment/InjectedLayers/FileInjectedLayer/=");
34 #line 7 "C:\Dev\Paradox\sources\tools\SiliconStudio.Paradox.ProjectGenerator\ResharperDotSettings.tt"
35 this.Write(this.ToStringHelper.ToStringWithCulture(FileInjectedGuid.ToString(
"N").ToUpperInvariant()));
39 this.Write(
"/AbsolutePath/@EntryValue\">Z:\\InvalidPath\\Paradox.sln.DotSettings</s:String>\r\n\t<s" +
40 ":String x:Key=\"/Default/Environment/InjectedLayers/FileInjectedLayer/=");
42 #line 8 "C:\Dev\Paradox\sources\tools\SiliconStudio.Paradox.ProjectGenerator\ResharperDotSettings.tt"
43 this.Write(this.ToStringHelper.ToStringWithCulture(FileInjectedGuid.ToString(
"N").ToUpperInvariant()));
47 this.Write(
"/RelativePath/@EntryValue\">..\\");
49 #line 8 "C:\Dev\Paradox\sources\tools\SiliconStudio.Paradox.ProjectGenerator\ResharperDotSettings.tt"
50 this.Write(this.ToStringHelper.ToStringWithCulture(SharedSolutionDotSettings.Name));
54 this.Write(
"</s:String>\r\n\t<s:Boolean x:Key=\"/Default/Environment/InjectedLayers/FileInjectedL" +
57 #line 9 "C:\Dev\Paradox\sources\tools\SiliconStudio.Paradox.ProjectGenerator\ResharperDotSettings.tt"
58 this.Write(this.ToStringHelper.ToStringWithCulture(FileInjectedGuid.ToString(
"N").ToUpperInvariant()));
62 this.Write(
"/@KeyIndexDefined\">True</s:Boolean>\r\n\t<s:Boolean x:Key=\"/Default/Environment/Inje" +
63 "ctedLayers/InjectedLayerCustomization/=File");
65 #line 10 "C:\Dev\Paradox\sources\tools\SiliconStudio.Paradox.ProjectGenerator\ResharperDotSettings.tt"
66 this.Write(this.ToStringHelper.ToStringWithCulture(FileInjectedGuid.ToString(
"N").ToUpperInvariant()));
70 this.Write(
"/@KeyIndexDefined\">True</s:Boolean>\r\n\t<s:Double x:Key=\"/Default/Environment/Injec" +
71 "tedLayers/InjectedLayerCustomization/=File");
73 #line 11 "C:\Dev\Paradox\sources\tools\SiliconStudio.Paradox.ProjectGenerator\ResharperDotSettings.tt"
74 this.Write(this.ToStringHelper.ToStringWithCulture(FileInjectedGuid.ToString(
"N").ToUpperInvariant()));
78 this.Write(
"/RelativePriority/@EntryValue\">1</s:Double></wpf:ResourceDictionary>");
79 return this.GenerationEnvironment.ToString();
89 [global::System.CodeDom.Compiler.GeneratedCodeAttribute(
"Microsoft.VisualStudio.TextTemplating",
"12.0.0.0")]
93 private global::System.Text.StringBuilder generationEnvironmentField;
94 private global::System.CodeDom.Compiler.CompilerErrorCollection errorsField;
95 private global::System.Collections.Generic.List<
int> indentLengthsField;
96 private string currentIndentField =
"";
97 private bool endsWithNewline;
98 private global::System.Collections.Generic.IDictionary<string,
object> sessionField;
104 protected System.Text.StringBuilder GenerationEnvironment
108 if ((this.generationEnvironmentField == null))
110 this.generationEnvironmentField =
new global::System.Text.StringBuilder();
112 return this.generationEnvironmentField;
116 this.generationEnvironmentField = value;
122 public System.CodeDom.Compiler.CompilerErrorCollection Errors
126 if ((this.errorsField == null))
128 this.errorsField =
new global::System.CodeDom.Compiler.CompilerErrorCollection();
130 return this.errorsField;
136 private System.Collections.Generic.List<
int> indentLengths
140 if ((this.indentLengthsField == null))
142 this.indentLengthsField =
new global::System.Collections.Generic.List<
int>();
144 return this.indentLengthsField;
150 public string CurrentIndent
154 return this.currentIndentField;
160 public virtual global::System.Collections.Generic.IDictionary<string,
object> Session
164 return this.sessionField;
168 this.sessionField = value;
172 #region Transform-time helpers
176 public void Write(
string textToAppend)
178 if (
string.IsNullOrEmpty(textToAppend))
184 if (((this.GenerationEnvironment.Length == 0)
185 ||
this.endsWithNewline))
187 this.GenerationEnvironment.Append(this.currentIndentField);
188 this.endsWithNewline =
false;
191 if (textToAppend.EndsWith(global::System.Environment.NewLine, global::System.StringComparison.CurrentCulture))
193 this.endsWithNewline =
true;
197 if ((this.currentIndentField.Length == 0))
199 this.GenerationEnvironment.Append(textToAppend);
203 textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
206 if (this.endsWithNewline)
208 this.GenerationEnvironment.Append(textToAppend, 0, (textToAppend.Length - this.currentIndentField.Length));
212 this.GenerationEnvironment.Append(textToAppend);
220 this.Write(textToAppend);
221 this.GenerationEnvironment.AppendLine();
222 this.endsWithNewline =
true;
229 this.Write(string.Format(global::System.Globalization.CultureInfo.CurrentCulture,
format, args));
236 this.WriteLine(string.Format(global::System.Globalization.CultureInfo.CurrentCulture,
format, args));
243 System.CodeDom.Compiler.CompilerError error =
new global::System.CodeDom.Compiler.CompilerError();
244 error.ErrorText = message;
245 this.Errors.Add(error);
252 System.CodeDom.Compiler.CompilerError error =
new global::System.CodeDom.Compiler.CompilerError();
253 error.ErrorText = message;
254 error.IsWarning =
true;
255 this.Errors.Add(error);
262 if ((indent == null))
264 throw new global::System.ArgumentNullException(
"indent");
266 this.currentIndentField = (this.currentIndentField + indent);
267 this.indentLengths.Add(indent.Length);
274 string returnValue =
"";
275 if ((this.indentLengths.Count > 0))
277 int indentLength = this.indentLengths[(this.indentLengths.Count - 1)];
278 this.indentLengths.RemoveAt((this.indentLengths.Count - 1));
279 if ((indentLength > 0))
281 returnValue = this.currentIndentField.Substring((this.currentIndentField.Length - indentLength));
282 this.currentIndentField = this.currentIndentField.Remove((this.currentIndentField.Length - indentLength));
292 this.indentLengths.Clear();
293 this.currentIndentField =
"";
296 #region ToString Helpers
302 private System.IFormatProvider formatProviderField = global::System.Globalization.CultureInfo.InvariantCulture;
306 public System.IFormatProvider FormatProvider
310 return this.formatProviderField ;
316 this.formatProviderField = value;
325 if ((objectToConvert == null))
327 throw new global::System.ArgumentNullException(
"objectToConvert");
329 System.Type t = objectToConvert.GetType();
330 System.Reflection.MethodInfo method = t.GetMethod(
"ToString",
new System.Type[] {
331 typeof(System.IFormatProvider)});
332 if ((method == null))
334 return objectToConvert.ToString();
338 return ((
string)(method.Invoke(objectToConvert,
new object[] {
339 this.formatProviderField })));
343 private ToStringInstanceHelper toStringHelperField =
new ToStringInstanceHelper();
347 public ToStringInstanceHelper ToStringHelper
351 return this.toStringHelperField;
void Warning(string message)
Raise a warning
void WriteLine(string format, params object[] args)
Write formatted text directly into the generated output
Utility class to produce culture-oriented representation of an object as a string.
virtual string TransformText()
Create the template output
void Error(string message)
Raise an error
void Write(string textToAppend)
Write text directly into the generated output
string ToStringWithCulture(object objectToConvert)
This is called from the compile/run appdomain to convert objects within an expression block to a stri...
void ClearIndent()
Remove any indentation
Base class for this transformation
void Write(string format, params object[] args)
Write formatted text directly into the generated output
void WriteLine(string textToAppend)
Write text directly into the generated output
_In_ size_t _In_ size_t _In_ DXGI_FORMAT format
void PushIndent(string indent)
Increase the indent
string PopIndent()
Remove the last indent that was added with PushIndent