~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to src/addins/CBinding/Parser/DataProvider.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
                public void Reset ()
67
67
                {
68
68
                        memberList.Clear ();
69
 
                        if (tag is IParsedFile) {
70
 
                                var types = new Stack<IUnresolvedTypeDefinition> (((IParsedFile)tag).TopLevelTypeDefinitions);
 
69
                        if (tag is IUnresolvedFile) {
 
70
                                var types = new Stack<IUnresolvedTypeDefinition> (((IUnresolvedFile)tag).TopLevelTypeDefinitions);
71
71
                                while (types.Count > 0) {
72
72
                                        var type = types.Pop ();
73
73
                                        memberList.Add (type);
82
82
                
83
83
                string GetString (Ambience amb, IUnresolvedEntity x)
84
84
                {
85
 
                        var ctx = Document.ParsedDocument.ParsedFile.GetTypeResolveContext (Document.Compilation, x.Region.Begin);
 
85
                        var ctx = new SimpleTypeResolveContext (Document.Compilation.MainAssembly);
86
86
                        IEntity rx = null;
87
87
                        if (x is IUnresolvedMember)
88
88
                                rx = ((IUnresolvedMember)x).CreateResolved (ctx);
89
89
                        
90
 
                        if (tag is IParsedFile)
 
90
                        if (tag is IUnresolvedFile)
91
91
                                return amb.GetString (rx, OutputFlags.IncludeGenerics | OutputFlags.IncludeParameters | OutputFlags.UseFullInnerTypeName | OutputFlags.ReformatDelegates);
92
92
                        return amb.GetString (rx, OutputFlags.IncludeGenerics | OutputFlags.IncludeParameters | OutputFlags.ReformatDelegates);
93
93
                }