Skip to content

Commit f7e6cc3

Browse files
author
Caitlin Bales (MSFT)
committed
Add comments about the custom file update methods
1 parent 96a95b4 commit f7e6cc3

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

Templates/Android/BaseModel.template.tt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,11 @@ public {1} {2}{3}{4} {{";
801801
@"// **NOTE** This file was generated by a tool and any changes will be overwritten.";
802802
}
803803

804+
/*
805+
* Add additional methods to a generated class
806+
* @param className The class that you will be adding methods to
807+
* @return The additional text to add to the generated file
808+
*/
804809
public string AddCustomCode(string className) {
805810
CustomMethods customMethods = new CustomMethods();
806811
var type = customMethods.GetType();
@@ -809,6 +814,11 @@ public {1} {2}{3}{4} {{";
809814
return property != null ? property.GetValue(customMethods).ToString() : string.Empty;
810815
}
811816

817+
/*
818+
* Add additional import statements to a generated class
819+
* @param className The class that you will be adding methods to
820+
* @return The additional text to add to the generated file
821+
*/
812822
public string AddCustomImport(string className) {
813823
CustomImports customImports = new CustomImports();
814824
var type = customImports.GetType();
@@ -820,7 +830,6 @@ public {1} {2}{3}{4} {{";
820830
/*
821831
* Find and replace overwrite values for the given class
822832
* @param className The class that you will be applying overwrites to
823-
*
824833
* @return An empty string (does not write anything new to the file)
825834
*/
826835
public string PostProcess(string className)

src/GraphODataTemplateWriter/CodeHelpers/Android/CustomImports.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66

77
namespace Microsoft.Graph.ODataTemplateWriter.CodeHelpers.Android
88
{
9+
/**
10+
* This class contains a list of constants that define import statements that should be
11+
* added at generation time
12+
* The field name should be equal to the name of the class you wish to edit
13+
* This will be used in BaseModel.template.tt in the AddCustomImports() method
14+
*/
915
public class CustomImports
1016
{
1117
public const string UploadSession = "import com.microsoft.graph.concurrency.ChunkedUploadProvider;\r\n";

src/GraphODataTemplateWriter/CodeHelpers/Android/CustomMethods.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66

77
namespace Microsoft.Graph.ODataTemplateWriter.CodeHelpers.Android
88
{
9+
/**
10+
* This class contains a list of constants that define methods that should be
11+
* added at generation time
12+
* The field name should be equal to the name of the class you wish to edit
13+
* This will be used in BaseModel.template.tt in the AddCustomCode() method
14+
*/
915
public class CustomMethods
1016
{
1117
public const string DriveItemRequestBuilder =

src/GraphODataTemplateWriter/CodeHelpers/Android/CustomOverwrites.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Microsoft.Graph.ODataTemplateWriter.CodeHelpers.Android
99
/**
1010
* This class contains a list of constants that define code snippets that should
1111
* be overwritten at generation time
12-
* The field name should be equal to the class name you wish to edit
12+
* The field name should be equal to the name of the class you wish to edit
1313
* The dictionary value should contain two string, the first is the search value
1414
* and the latter is the replace value
1515
* This will be used in BaseModel.template.tt in the PostProcess() method

0 commit comments

Comments
 (0)