-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
766 additions
and
683 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 25 additions & 26 deletions
51
src/Maui.BindableProperty.Generator/CodeWriter/CodeWriterExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,37 @@ | ||
#pragma warning disable SA1300 // Element must begin with upper-case letter | ||
|
||
// Based on https://github.com/SaladLab/CodeWriter | ||
namespace Maui.BindableProperty.Generator | ||
namespace Maui.BindableProperty.Generator; | ||
|
||
public static class CodeWriterExtensions | ||
{ | ||
public static class CodeWriterExtensions | ||
public static void _(this CodeWriter w, string str = null) | ||
{ | ||
public static void _(this CodeWriter w, string str = null) | ||
{ | ||
w.Write(str); | ||
} | ||
w.Write(str); | ||
} | ||
|
||
public static void _(this CodeWriter w, string str, params string[] strs) | ||
{ | ||
w.Write(str, strs); | ||
} | ||
public static void _(this CodeWriter w, string str, params string[] strs) | ||
{ | ||
w.Write(str, strs); | ||
} | ||
|
||
public static UsingHandle b(this CodeWriter w, params string[] strs) | ||
{ | ||
return w.OpenBlock(strs, newLineAfterBlockEnd: false); | ||
} | ||
public static UsingHandle b(this CodeWriter w, params string[] strs) | ||
{ | ||
return w.OpenBlock(strs, newLineAfterBlockEnd: false); | ||
} | ||
|
||
public static UsingHandle B(this CodeWriter w, params string[] strs) | ||
{ | ||
return w.OpenBlock(strs, newLineAfterBlockEnd: true); | ||
} | ||
public static UsingHandle B(this CodeWriter w, params string[] strs) | ||
{ | ||
return w.OpenBlock(strs, newLineAfterBlockEnd: true); | ||
} | ||
|
||
public static UsingHandle i(this CodeWriter w, string begin = null, string end = null) | ||
{ | ||
return w.OpenIndent(begin, end, newLineAfterBlockEnd: false); | ||
} | ||
public static UsingHandle i(this CodeWriter w, string begin = null, string end = null) | ||
{ | ||
return w.OpenIndent(begin, end, newLineAfterBlockEnd: false); | ||
} | ||
|
||
public static UsingHandle I(this CodeWriter w, string begin = null, string end = null) | ||
{ | ||
return w.OpenIndent(begin, end, newLineAfterBlockEnd: true); | ||
} | ||
public static UsingHandle I(this CodeWriter w, string begin = null, string end = null) | ||
{ | ||
return w.OpenIndent(begin, end, newLineAfterBlockEnd: true); | ||
} | ||
} |
Oops, something went wrong.