@@ -14,8 +14,10 @@ internal static class ExcelObjectModel
14
14
{
15
15
private static IEnumerable < Declaration > _excelDeclarations ;
16
16
private static readonly QualifiedModuleName ExcelModuleName = new QualifiedModuleName ( "Excel" , "Excel" ) ;
17
- public static readonly QualifiedModuleName WorkbookModuleName = new QualifiedModuleName ( "Excel" , "Workbook" ) ;
18
- public static readonly QualifiedModuleName WorksheetModuleName = new QualifiedModuleName ( "Excel" , "Worksheet" ) ;
17
+ private static readonly QualifiedModuleName WorkbookModuleName = new QualifiedModuleName ( "Excel" , "Workbook" ) ;
18
+ private static readonly QualifiedModuleName WorksheetModuleName = new QualifiedModuleName ( "Excel" , "Worksheet" ) ;
19
+ private static readonly QualifiedModuleName RangeModuleName = new QualifiedModuleName ( "Excel" , "Range" ) ;
20
+ private static readonly QualifiedModuleName ApplicationModuleName = new QualifiedModuleName ( "Excel" , "Application" ) ;
19
21
20
22
public static IEnumerable < Declaration > Declarations
21
23
{
@@ -125,12 +127,12 @@ private class RangeClass
125
127
{
126
128
public static readonly Declaration Range = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "Range" ) , ExcelLib . Excel , "Excel" , "Range" , false , false , Accessibility . Global , DeclarationType . Class ) ;
127
129
128
- public static Declaration Cells = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "Cells" ) , Range , "Excel.Range" , "Range" , false , false , Accessibility . Public , DeclarationType . PropertyGet ) ;
129
- public static Declaration CellsAssign = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "Cells" ) , Range , "Excel.Range" , "Range" , false , false , Accessibility . Public , DeclarationType . PropertyLet ) ; // cheating to simulate default property of return type.
130
- public static Declaration Activate = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "Activate" ) , Range , "Excel.Range" , "Variant" , false , false , Accessibility . Public , DeclarationType . Function ) ;
131
- public static Declaration Select = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "Select" ) , Range , "Excel.Range" , "Variant" , false , false , Accessibility . Public , DeclarationType . Function ) ;
132
- public static Declaration Columns = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "Columns" ) , Range , "Excel.Range" , "Range" , false , false , Accessibility . Public , DeclarationType . PropertyGet ) ;
133
- public static Declaration Rows = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "Rows" ) , Range , "Excel.Range" , "Range" , false , false , Accessibility . Public , DeclarationType . PropertyGet ) ;
130
+ public static Declaration Cells = new Declaration ( new QualifiedMemberName ( RangeModuleName , "Cells" ) , Range , "Excel.Range" , "Range" , false , false , Accessibility . Public , DeclarationType . PropertyGet ) ;
131
+ public static Declaration CellsAssign = new Declaration ( new QualifiedMemberName ( RangeModuleName , "Cells" ) , Range , "Excel.Range" , "Range" , false , false , Accessibility . Public , DeclarationType . PropertyLet ) ; // cheating to simulate default property of return type.
132
+ public static Declaration Activate = new Declaration ( new QualifiedMemberName ( RangeModuleName , "Activate" ) , Range , "Excel.Range" , "Variant" , false , false , Accessibility . Public , DeclarationType . Function ) ;
133
+ public static Declaration Select = new Declaration ( new QualifiedMemberName ( RangeModuleName , "Select" ) , Range , "Excel.Range" , "Variant" , false , false , Accessibility . Public , DeclarationType . Function ) ;
134
+ public static Declaration Columns = new Declaration ( new QualifiedMemberName ( RangeModuleName , "Columns" ) , Range , "Excel.Range" , "Range" , false , false , Accessibility . Public , DeclarationType . PropertyGet ) ;
135
+ public static Declaration Rows = new Declaration ( new QualifiedMemberName ( RangeModuleName , "Rows" ) , Range , "Excel.Range" , "Range" , false , false , Accessibility . Public , DeclarationType . PropertyGet ) ;
134
136
}
135
137
136
138
private class GlobalClass
@@ -163,26 +165,26 @@ private class ApplicationClass
163
165
{
164
166
public static readonly Declaration Application = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "Application" ) , ExcelLib . Excel , "Application" , "Application" , false , false , Accessibility . Global , DeclarationType . Module ) ; // cheating, it's actually a class.
165
167
166
- public static Declaration Evaluate = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "Evaluate" ) , Application , "Excel.Application" , "Variant" , false , false , Accessibility . Global , DeclarationType . Function ) ;
167
- public static Declaration Range = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "Range" ) , Application , "Excel.Application" , "Range" , true , false , Accessibility . Global , DeclarationType . PropertyGet ) ;
168
- public static Declaration RangeAssign = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "Range" ) , Application , "Excel.Application" , "Range" , true , false , Accessibility . Global , DeclarationType . PropertyLet ) ; // cheating to simuate default property of return type.
169
- public static Declaration Selection = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "Selection" ) , Application , "Excel.Application" , "Object" , true , false , Accessibility . Global , DeclarationType . PropertyGet ) ;
170
-
171
- public static Declaration Activate = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "Activate" ) , Application , "Excel.Application" , "Variant" , false , false , Accessibility . Global , DeclarationType . Function ) ;
172
- public static Declaration Select = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "Select" ) , Application , "Excel.Application" , "Variant" , false , false , Accessibility . Global , DeclarationType . Function ) ;
173
- public static Declaration Cells = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "Cells" ) , Application , "Excel.Application" , "Range" , false , false , Accessibility . Global , DeclarationType . PropertyGet ) ;
174
- public static Declaration CellsAssign = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "Cells" ) , Application , "Excel.Application" , "Range" , false , false , Accessibility . Global , DeclarationType . PropertyLet ) ; // cheating to simulate default property of return type.
175
- public static Declaration Names = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "Names" ) , Application , "Excel.Application" , "Names" , false , false , Accessibility . Global , DeclarationType . PropertyGet ) ;
176
- public static Declaration Sheets = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "Sheets" ) , Application , "Excel.Application" , "Sheets" , false , false , Accessibility . Global , DeclarationType . PropertyGet ) ;
177
- public static Declaration Worksheets = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "Worksheets" ) , Application , "Excel.Application" , "Worksheets" , false , false , Accessibility . Global , DeclarationType . PropertyGet ) ;
178
- public static Declaration WorksheetFunction = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "WorksheetFunction" ) , Application , "Excel.Application" , "WorksheetFunction" , false , false , Accessibility . Global , DeclarationType . PropertyGet ) ;
179
-
180
- public static Declaration Columns = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "Columns" ) , Application , "Excel.Application" , "Range" , false , false , Accessibility . Global , DeclarationType . PropertyGet ) ;
181
- public static Declaration Rows = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "Rows" ) , Application , "Excel.Application" , "Range" , false , false , Accessibility . Global , DeclarationType . PropertyGet ) ;
182
-
183
- public static Declaration ActiveCell = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "ActiveCell" ) , Application , "Excel.Application" , "Range" , false , false , Accessibility . Global , DeclarationType . PropertyGet ) ;
184
- public static Declaration ActiveSheet = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "ActiveSheet" ) , Application , "Excel.Application" , "Worksheet" , false , false , Accessibility . Global , DeclarationType . PropertyGet ) ; // cheating on return type
185
- public static Declaration ActiveWorkbook = new Declaration ( new QualifiedMemberName ( ExcelModuleName , "ActiveWorkbook" ) , Application , "Excel.Application" , "Workbook" , false , false , Accessibility . Global , DeclarationType . PropertyGet ) ;
168
+ public static Declaration Evaluate = new Declaration ( new QualifiedMemberName ( ApplicationModuleName , "Evaluate" ) , Application , "Excel.Application" , "Variant" , false , false , Accessibility . Global , DeclarationType . Function ) ;
169
+ public static Declaration Range = new Declaration ( new QualifiedMemberName ( ApplicationModuleName , "Range" ) , Application , "Excel.Application" , "Range" , true , false , Accessibility . Global , DeclarationType . PropertyGet ) ;
170
+ public static Declaration RangeAssign = new Declaration ( new QualifiedMemberName ( ApplicationModuleName , "Range" ) , Application , "Excel.Application" , "Range" , true , false , Accessibility . Global , DeclarationType . PropertyLet ) ; // cheating to simuate default property of return type.
171
+ public static Declaration Selection = new Declaration ( new QualifiedMemberName ( ApplicationModuleName , "Selection" ) , Application , "Excel.Application" , "Object" , true , false , Accessibility . Global , DeclarationType . PropertyGet ) ;
172
+
173
+ public static Declaration Activate = new Declaration ( new QualifiedMemberName ( ApplicationModuleName , "Activate" ) , Application , "Excel.Application" , "Variant" , false , false , Accessibility . Global , DeclarationType . Function ) ;
174
+ public static Declaration Select = new Declaration ( new QualifiedMemberName ( ApplicationModuleName , "Select" ) , Application , "Excel.Application" , "Variant" , false , false , Accessibility . Global , DeclarationType . Function ) ;
175
+ public static Declaration Cells = new Declaration ( new QualifiedMemberName ( ApplicationModuleName , "Cells" ) , Application , "Excel.Application" , "Range" , false , false , Accessibility . Global , DeclarationType . PropertyGet ) ;
176
+ public static Declaration CellsAssign = new Declaration ( new QualifiedMemberName ( ApplicationModuleName , "Cells" ) , Application , "Excel.Application" , "Range" , false , false , Accessibility . Global , DeclarationType . PropertyLet ) ; // cheating to simulate default property of return type.
177
+ public static Declaration Names = new Declaration ( new QualifiedMemberName ( ApplicationModuleName , "Names" ) , Application , "Excel.Application" , "Names" , false , false , Accessibility . Global , DeclarationType . PropertyGet ) ;
178
+ public static Declaration Sheets = new Declaration ( new QualifiedMemberName ( ApplicationModuleName , "Sheets" ) , Application , "Excel.Application" , "Sheets" , false , false , Accessibility . Global , DeclarationType . PropertyGet ) ;
179
+ public static Declaration Worksheets = new Declaration ( new QualifiedMemberName ( ApplicationModuleName , "Worksheets" ) , Application , "Excel.Application" , "Worksheets" , false , false , Accessibility . Global , DeclarationType . PropertyGet ) ;
180
+ public static Declaration WorksheetFunction = new Declaration ( new QualifiedMemberName ( ApplicationModuleName , "WorksheetFunction" ) , Application , "Excel.Application" , "WorksheetFunction" , false , false , Accessibility . Global , DeclarationType . PropertyGet ) ;
181
+
182
+ public static Declaration Columns = new Declaration ( new QualifiedMemberName ( ApplicationModuleName , "Columns" ) , Application , "Excel.Application" , "Range" , false , false , Accessibility . Global , DeclarationType . PropertyGet ) ;
183
+ public static Declaration Rows = new Declaration ( new QualifiedMemberName ( ApplicationModuleName , "Rows" ) , Application , "Excel.Application" , "Range" , false , false , Accessibility . Global , DeclarationType . PropertyGet ) ;
184
+
185
+ public static Declaration ActiveCell = new Declaration ( new QualifiedMemberName ( ApplicationModuleName , "ActiveCell" ) , Application , "Excel.Application" , "Range" , false , false , Accessibility . Global , DeclarationType . PropertyGet ) ;
186
+ public static Declaration ActiveSheet = new Declaration ( new QualifiedMemberName ( ApplicationModuleName , "ActiveSheet" ) , Application , "Excel.Application" , "Worksheet" , false , false , Accessibility . Global , DeclarationType . PropertyGet ) ; // cheating on return type
187
+ public static Declaration ActiveWorkbook = new Declaration ( new QualifiedMemberName ( ApplicationModuleName , "ActiveWorkbook" ) , Application , "Excel.Application" , "Workbook" , false , false , Accessibility . Global , DeclarationType . PropertyGet ) ;
186
188
}
187
189
}
188
190
}
0 commit comments