~ubuntu-branches/ubuntu/lucid/monodevelop/lucid

« back to all changes in this revision

Viewing changes to src/core/Mono.Debugging/Mono.Debugging.Evaluation/BaseTypeViewSource.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2010-01-10 14:25:59 UTC
  • mfrom: (1.2.5 upstream) (1.3.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100110142559-sorji5exvk9tyknr
Tags: 2.2+dfsg-2
* debian/rules/remove_support_for_non_debian_functionality.patch:
  + Also fix monodevelop-core-addins.pc to remove links to the
    addins we remove in Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// 
 
2
// BaseTypeViewSource.cs
 
3
//  
 
4
// Author:
 
5
//       Lluis Sanchez Gual <lluis@novell.com>
 
6
// 
 
7
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
 
8
// 
 
9
// Permission is hereby granted, free of charge, to any person obtaining a copy
 
10
// of this software and associated documentation files (the "Software"), to deal
 
11
// in the Software without restriction, including without limitation the rights
 
12
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 
13
// copies of the Software, and to permit persons to whom the Software is
 
14
// furnished to do so, subject to the following conditions:
 
15
// 
 
16
// The above copyright notice and this permission notice shall be included in
 
17
// all copies or substantial portions of the Software.
 
18
// 
 
19
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 
20
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
21
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 
22
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 
23
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 
24
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 
25
// THE SOFTWARE.
 
26
 
 
27
using System;
 
28
using Mono.Debugging.Backend;
 
29
using Mono.Debugging.Client;
 
30
 
 
31
namespace Mono.Debugging.Evaluation
 
32
{
 
33
        public class BaseTypeViewSource: RemoteFrameObject, IObjectValueSource
 
34
        {
 
35
                EvaluationContext ctx;
 
36
                object type;
 
37
                object obj;
 
38
                IObjectSource objectSource;
 
39
                
 
40
                public BaseTypeViewSource (EvaluationContext ctx, IObjectSource objectSource, object type, object obj)
 
41
                {
 
42
                        this.ctx = ctx;
 
43
                        this.type = type;
 
44
                        this.obj = obj;
 
45
                        this.objectSource = objectSource;
 
46
                }
 
47
                
 
48
                public static ObjectValue CreateBaseTypeView (EvaluationContext ctx, IObjectSource objectSource, object type, object obj)
 
49
                {
 
50
                        BaseTypeViewSource src = new BaseTypeViewSource (ctx, objectSource, type, obj);
 
51
                        src.Connect ();
 
52
                        string tname = ctx.Adapter.GetDisplayTypeName (ctx, type);
 
53
                        return ObjectValue.CreateObject (src, new ObjectPath ("base"), tname, "{" + tname + "}", ObjectValueFlags.Type|ObjectValueFlags.ReadOnly|ObjectValueFlags.NoRefresh, null);
 
54
                }
 
55
                
 
56
                #region IObjectValueSource implementation
 
57
                public ObjectValue[] GetChildren (ObjectPath path, int index, int count)
 
58
                {
 
59
                        return ctx.Adapter.GetObjectValueChildren (ctx, objectSource, type, obj, index, count, false);
 
60
                }
 
61
                
 
62
                
 
63
                public string SetValue (ObjectPath path, string value)
 
64
                {
 
65
                        throw new NotSupportedException();
 
66
                }
 
67
                
 
68
                
 
69
                public ObjectValue GetValue (ObjectPath path, EvaluationOptions options)
 
70
                {
 
71
                        throw new NotSupportedException();
 
72
                }
 
73
                
 
74
                #endregion
 
75
        }
 
76
}