File tree Expand file tree Collapse file tree 4 files changed +23
-2
lines changed
src/GraphODataTemplateWriter/CodeHelpers/Android Expand file tree Collapse file tree 4 files changed +23
-2
lines changed Original file line number Diff line number Diff 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)
Original file line number Diff line number Diff line change 66
77namespace 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 " ;
Original file line number Diff line number Diff line change 66
77namespace 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 =
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments