Skip to content

Commit 12e2cd4

Browse files
committed
added member attributes to Unwrap method
1 parent 26597d2 commit 12e2cd4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Rubberduck.Parsing/Symbols/SerializableDeclaration.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System.Collections.Generic;
22
using System.Linq;
33
using System.Runtime.Serialization;
4+
using Rubberduck.Parsing.VBA;
45
using Rubberduck.VBEditor;
56

67
namespace Rubberduck.Parsing.Symbols
@@ -96,7 +97,12 @@ public SerializableDeclaration(Declaration declaration)
9697

9798
public Declaration Unwrap(Declaration parent)
9899
{
99-
return new Declaration(QualifiedMemberName, parent, ParentScope, AsTypeName, TypeHint, IsSelfAssigned, IsWithEvents, Accessibility, DeclarationType, null, Selection.Empty, IsArray, null, IsBuiltIn);
100+
var attributes = new Attributes();
101+
foreach (var attribute in Attributes)
102+
{
103+
attributes.Add(attribute.Name, attribute.Values);
104+
}
105+
return new Declaration(QualifiedMemberName, parent, ParentScope, AsTypeName, TypeHint, IsSelfAssigned, IsWithEvents, Accessibility, DeclarationType, null, Selection.Empty, IsArray, null, IsBuiltIn, null, attributes);
100106
}
101107
}
102108
}

0 commit comments

Comments
 (0)