@@ -146,7 +146,7 @@ private string GetTypeName(ITypeInfo info)
146
146
return typeName . Equals ( "LONG_PTR" ) ? "LongPtr" : typeName ; //Quickfix for http://chat.stackexchange.com/transcript/message/30119269#30119269
147
147
}
148
148
149
- public List < Declaration > GetDeclarationsForReference ( IReference reference , out SerializableDeclarationTree tree )
149
+ public List < Declaration > GetDeclarationsForReference ( IReference reference )
150
150
{
151
151
var output = new List < Declaration > ( ) ;
152
152
var projectName = reference . Name ;
@@ -156,14 +156,12 @@ public List<Declaration> GetDeclarationsForReference(IReference reference, out S
156
156
LoadTypeLibEx ( path , REGKIND . REGKIND_NONE , out typeLibrary ) ;
157
157
if ( typeLibrary == null )
158
158
{
159
- tree = null ;
160
159
return output ;
161
160
}
162
161
var projectQualifiedModuleName = new QualifiedModuleName ( projectName , path , projectName ) ;
163
162
var projectQualifiedMemberName = new QualifiedMemberName ( projectQualifiedModuleName , projectName ) ;
164
163
var projectDeclaration = new ProjectDeclaration ( projectQualifiedMemberName , projectName , isBuiltIn : true ) ;
165
164
output . Add ( projectDeclaration ) ;
166
- var moduleTrees = new List < SerializableDeclarationTree > ( ) ;
167
165
168
166
var typeCount = typeLibrary . GetTypeInfoCount ( ) ;
169
167
for ( var i = 0 ; i < typeCount ; i ++ )
@@ -175,7 +173,6 @@ public List<Declaration> GetDeclarationsForReference(IReference reference, out S
175
173
}
176
174
catch ( NullReferenceException )
177
175
{
178
- tree = null ;
179
176
return output ;
180
177
}
181
178
@@ -290,26 +287,16 @@ public List<Declaration> GetDeclarationsForReference(IReference reference, out S
290
287
info . ReleaseTypeAttr ( typeAttributesPointer ) ;
291
288
292
289
output . Add ( moduleDeclaration ) ;
293
- var moduleTree = new SerializableDeclarationTree ( new SerializableDeclaration ( moduleDeclaration ) , comInfo . MemberTrees ) ;
294
- moduleTrees . Add ( moduleTree ) ;
295
290
}
296
291
297
292
foreach ( var member in _comInformation . Values )
298
293
{
299
294
LoadDeclarationsInModule ( output , member ) ;
300
295
}
301
296
302
- tree = new SerializableDeclarationTree ( new SerializableDeclaration ( projectDeclaration ) , moduleTrees ) ;
303
297
return output ;
304
298
}
305
299
306
- [ Obsolete ( "Use the overload that outputs a SerializableDeclarationTree instead." ) ]
307
- public List < Declaration > GetDeclarationsForReference ( IReference reference )
308
- {
309
- SerializableDeclarationTree tree ;
310
- return GetDeclarationsForReference ( reference , out tree ) ;
311
- }
312
-
313
300
private void LoadDeclarationsInModule ( List < Declaration > output , ComInformation member )
314
301
{
315
302
if ( member . TypeAttributes . typekind == TYPEKIND . TKIND_COCLASS )
@@ -360,17 +347,12 @@ memberDeclaration is ICanBeDefaultMember &&
360
347
{
361
348
parameters . Last ( ) . IsParamArray = true ;
362
349
}
363
-
364
- var parameterTrees = parameters . Select ( p => new SerializableDeclarationTree ( p ) ) ;
365
- var tree = new SerializableDeclarationTree ( new SerializableDeclaration ( memberDeclaration ) , parameterTrees ) ;
366
- member . MemberTrees . Add ( tree ) ;
367
350
}
368
351
369
352
for ( var fieldIndex = 0 ; fieldIndex < member . TypeAttributes . cVars ; fieldIndex ++ )
370
353
{
371
354
var declaration = CreateFieldDeclaration ( member . TypeInfo , fieldIndex , member . TypeDeclarationType , member . TypeQualifiedModuleName , member . ModuleDeclaration ) ;
372
355
output . Add ( declaration ) ;
373
- member . MemberTrees . Add ( new SerializableDeclarationTree ( declaration ) ) ;
374
356
}
375
357
}
376
358
0 commit comments