Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
ResharperDotSettings.cs
Go to the documentation of this file.
1 // ------------------------------------------------------------------------------
2 // <auto-generated>
3 // This code was generated by a tool.
4 // Runtime Version: 12.0.0.0
5 //
6 // Changes to this file may cause incorrect behavior and will be lost if
7 // the code is regenerated.
8 // </auto-generated>
9 // ------------------------------------------------------------------------------
10 namespace SiliconStudio.Paradox.ProjectGenerator
11 {
12  using System.Linq;
13  using System.Text;
14  using System.Collections.Generic;
15  using System;
16 
17  /// <summary>
18  /// Class to produce the template output
19  /// </summary>
20 
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
24  {
25 #line hidden
26  /// <summary>
27  /// Create the template output
28  /// </summary>
29  public virtual string TransformText()
30  {
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/=");
33 
34  #line 7 "C:\Dev\Paradox\sources\tools\SiliconStudio.Paradox.ProjectGenerator\ResharperDotSettings.tt"
35  this.Write(this.ToStringHelper.ToStringWithCulture(FileInjectedGuid.ToString("N").ToUpperInvariant()));
36 
37  #line default
38  #line hidden
39  this.Write("/AbsolutePath/@EntryValue\">Z:\\InvalidPath\\Paradox.sln.DotSettings</s:String>\r\n\t<s" +
40  ":String x:Key=\"/Default/Environment/InjectedLayers/FileInjectedLayer/=");
41 
42  #line 8 "C:\Dev\Paradox\sources\tools\SiliconStudio.Paradox.ProjectGenerator\ResharperDotSettings.tt"
43  this.Write(this.ToStringHelper.ToStringWithCulture(FileInjectedGuid.ToString("N").ToUpperInvariant()));
44 
45  #line default
46  #line hidden
47  this.Write("/RelativePath/@EntryValue\">..\\");
48 
49  #line 8 "C:\Dev\Paradox\sources\tools\SiliconStudio.Paradox.ProjectGenerator\ResharperDotSettings.tt"
50  this.Write(this.ToStringHelper.ToStringWithCulture(SharedSolutionDotSettings.Name));
51 
52  #line default
53  #line hidden
54  this.Write("</s:String>\r\n\t<s:Boolean x:Key=\"/Default/Environment/InjectedLayers/FileInjectedL" +
55  "ayer/=");
56 
57  #line 9 "C:\Dev\Paradox\sources\tools\SiliconStudio.Paradox.ProjectGenerator\ResharperDotSettings.tt"
58  this.Write(this.ToStringHelper.ToStringWithCulture(FileInjectedGuid.ToString("N").ToUpperInvariant()));
59 
60  #line default
61  #line hidden
62  this.Write("/@KeyIndexDefined\">True</s:Boolean>\r\n\t<s:Boolean x:Key=\"/Default/Environment/Inje" +
63  "ctedLayers/InjectedLayerCustomization/=File");
64 
65  #line 10 "C:\Dev\Paradox\sources\tools\SiliconStudio.Paradox.ProjectGenerator\ResharperDotSettings.tt"
66  this.Write(this.ToStringHelper.ToStringWithCulture(FileInjectedGuid.ToString("N").ToUpperInvariant()));
67 
68  #line default
69  #line hidden
70  this.Write("/@KeyIndexDefined\">True</s:Boolean>\r\n\t<s:Double x:Key=\"/Default/Environment/Injec" +
71  "tedLayers/InjectedLayerCustomization/=File");
72 
73  #line 11 "C:\Dev\Paradox\sources\tools\SiliconStudio.Paradox.ProjectGenerator\ResharperDotSettings.tt"
74  this.Write(this.ToStringHelper.ToStringWithCulture(FileInjectedGuid.ToString("N").ToUpperInvariant()));
75 
76  #line default
77  #line hidden
78  this.Write("/RelativePriority/@EntryValue\">1</s:Double></wpf:ResourceDictionary>");
79  return this.GenerationEnvironment.ToString();
80  }
81  }
82 
83  #line default
84  #line hidden
85  #region Base class
86  /// <summary>
87  /// Base class for this transformation
88  /// </summary>
89  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "12.0.0.0")]
91  {
92  #region Fields
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;
99  #endregion
100  #region Properties
101  /// <summary>
102  /// The string builder that generation-time code is using to assemble generated output
103  /// </summary>
104  protected System.Text.StringBuilder GenerationEnvironment
105  {
106  get
107  {
108  if ((this.generationEnvironmentField == null))
109  {
110  this.generationEnvironmentField = new global::System.Text.StringBuilder();
111  }
112  return this.generationEnvironmentField;
113  }
114  set
115  {
116  this.generationEnvironmentField = value;
117  }
118  }
119  /// <summary>
120  /// The error collection for the generation process
121  /// </summary>
122  public System.CodeDom.Compiler.CompilerErrorCollection Errors
123  {
124  get
125  {
126  if ((this.errorsField == null))
127  {
128  this.errorsField = new global::System.CodeDom.Compiler.CompilerErrorCollection();
129  }
130  return this.errorsField;
131  }
132  }
133  /// <summary>
134  /// A list of the lengths of each indent that was added with PushIndent
135  /// </summary>
136  private System.Collections.Generic.List<int> indentLengths
137  {
138  get
139  {
140  if ((this.indentLengthsField == null))
141  {
142  this.indentLengthsField = new global::System.Collections.Generic.List<int>();
143  }
144  return this.indentLengthsField;
145  }
146  }
147  /// <summary>
148  /// Gets the current indent we use when adding lines to the output
149  /// </summary>
150  public string CurrentIndent
151  {
152  get
153  {
154  return this.currentIndentField;
155  }
156  }
157  /// <summary>
158  /// Current transformation session
159  /// </summary>
160  public virtual global::System.Collections.Generic.IDictionary<string, object> Session
161  {
162  get
163  {
164  return this.sessionField;
165  }
166  set
167  {
168  this.sessionField = value;
169  }
170  }
171  #endregion
172  #region Transform-time helpers
173  /// <summary>
174  /// Write text directly into the generated output
175  /// </summary>
176  public void Write(string textToAppend)
177  {
178  if (string.IsNullOrEmpty(textToAppend))
179  {
180  return;
181  }
182  // If we're starting off, or if the previous text ended with a newline,
183  // we have to append the current indent first.
184  if (((this.GenerationEnvironment.Length == 0)
185  || this.endsWithNewline))
186  {
187  this.GenerationEnvironment.Append(this.currentIndentField);
188  this.endsWithNewline = false;
189  }
190  // Check if the current text ends with a newline
191  if (textToAppend.EndsWith(global::System.Environment.NewLine, global::System.StringComparison.CurrentCulture))
192  {
193  this.endsWithNewline = true;
194  }
195  // This is an optimization. If the current indent is "", then we don't have to do any
196  // of the more complex stuff further down.
197  if ((this.currentIndentField.Length == 0))
198  {
199  this.GenerationEnvironment.Append(textToAppend);
200  return;
201  }
202  // Everywhere there is a newline in the text, add an indent after it
203  textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
204  // If the text ends with a newline, then we should strip off the indent added at the very end
205  // because the appropriate indent will be added when the next time Write() is called
206  if (this.endsWithNewline)
207  {
208  this.GenerationEnvironment.Append(textToAppend, 0, (textToAppend.Length - this.currentIndentField.Length));
209  }
210  else
211  {
212  this.GenerationEnvironment.Append(textToAppend);
213  }
214  }
215  /// <summary>
216  /// Write text directly into the generated output
217  /// </summary>
218  public void WriteLine(string textToAppend)
219  {
220  this.Write(textToAppend);
221  this.GenerationEnvironment.AppendLine();
222  this.endsWithNewline = true;
223  }
224  /// <summary>
225  /// Write formatted text directly into the generated output
226  /// </summary>
227  public void Write(string format, params object[] args)
228  {
229  this.Write(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args));
230  }
231  /// <summary>
232  /// Write formatted text directly into the generated output
233  /// </summary>
234  public void WriteLine(string format, params object[] args)
235  {
236  this.WriteLine(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args));
237  }
238  /// <summary>
239  /// Raise an error
240  /// </summary>
241  public void Error(string message)
242  {
243  System.CodeDom.Compiler.CompilerError error = new global::System.CodeDom.Compiler.CompilerError();
244  error.ErrorText = message;
245  this.Errors.Add(error);
246  }
247  /// <summary>
248  /// Raise a warning
249  /// </summary>
250  public void Warning(string message)
251  {
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);
256  }
257  /// <summary>
258  /// Increase the indent
259  /// </summary>
260  public void PushIndent(string indent)
261  {
262  if ((indent == null))
263  {
264  throw new global::System.ArgumentNullException("indent");
265  }
266  this.currentIndentField = (this.currentIndentField + indent);
267  this.indentLengths.Add(indent.Length);
268  }
269  /// <summary>
270  /// Remove the last indent that was added with PushIndent
271  /// </summary>
272  public string PopIndent()
273  {
274  string returnValue = "";
275  if ((this.indentLengths.Count > 0))
276  {
277  int indentLength = this.indentLengths[(this.indentLengths.Count - 1)];
278  this.indentLengths.RemoveAt((this.indentLengths.Count - 1));
279  if ((indentLength > 0))
280  {
281  returnValue = this.currentIndentField.Substring((this.currentIndentField.Length - indentLength));
282  this.currentIndentField = this.currentIndentField.Remove((this.currentIndentField.Length - indentLength));
283  }
284  }
285  return returnValue;
286  }
287  /// <summary>
288  /// Remove any indentation
289  /// </summary>
290  public void ClearIndent()
291  {
292  this.indentLengths.Clear();
293  this.currentIndentField = "";
294  }
295  #endregion
296  #region ToString Helpers
297  /// <summary>
298  /// Utility class to produce culture-oriented representation of an object as a string.
299  /// </summary>
301  {
302  private System.IFormatProvider formatProviderField = global::System.Globalization.CultureInfo.InvariantCulture;
303  /// <summary>
304  /// Gets or sets format provider to be used by ToStringWithCulture method.
305  /// </summary>
306  public System.IFormatProvider FormatProvider
307  {
308  get
309  {
310  return this.formatProviderField ;
311  }
312  set
313  {
314  if ((value != null))
315  {
316  this.formatProviderField = value;
317  }
318  }
319  }
320  /// <summary>
321  /// This is called from the compile/run appdomain to convert objects within an expression block to a string
322  /// </summary>
323  public string ToStringWithCulture(object objectToConvert)
324  {
325  if ((objectToConvert == null))
326  {
327  throw new global::System.ArgumentNullException("objectToConvert");
328  }
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))
333  {
334  return objectToConvert.ToString();
335  }
336  else
337  {
338  return ((string)(method.Invoke(objectToConvert, new object[] {
339  this.formatProviderField })));
340  }
341  }
342  }
343  private ToStringInstanceHelper toStringHelperField = new ToStringInstanceHelper();
344  /// <summary>
345  /// Helper to produce culture-oriented representation of an object as a string
346  /// </summary>
347  public ToStringInstanceHelper ToStringHelper
348  {
349  get
350  {
351  return this.toStringHelperField;
352  }
353  }
354  #endregion
355  }
356  #endregion
357 }
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 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 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
Definition: DirectXTexP.h:175
string PopIndent()
Remove the last indent that was added with PushIndent