summaryrefslogtreecommitdiff
path: root/Util/VS2010/Dafny/DafnyLanguageService/Integration/Methods.cs
diff options
context:
space:
mode:
authorGravatar rustanleino <unknown>2010-07-15 23:50:30 +0000
committerGravatar rustanleino <unknown>2010-07-15 23:50:30 +0000
commit002b9a5f3e614e21214e7f95e8b07f2ec332dfd9 (patch)
tree4b5d35f5caa6d3f6a51e7a7da90747c9c66f0420 /Util/VS2010/Dafny/DafnyLanguageService/Integration/Methods.cs
parent4fefb6bde8dd6824d820af5137ad866c5e97756d (diff)
Visual Studio 2010 integration for Dafny and Chalice. See the "How to install binaries" link from the boogie.codeplex.com home page.
Diffstat (limited to 'Util/VS2010/Dafny/DafnyLanguageService/Integration/Methods.cs')
-rw-r--r--Util/VS2010/Dafny/DafnyLanguageService/Integration/Methods.cs50
1 files changed, 50 insertions, 0 deletions
diff --git a/Util/VS2010/Dafny/DafnyLanguageService/Integration/Methods.cs b/Util/VS2010/Dafny/DafnyLanguageService/Integration/Methods.cs
new file mode 100644
index 00000000..1d7c124f
--- /dev/null
+++ b/Util/VS2010/Dafny/DafnyLanguageService/Integration/Methods.cs
@@ -0,0 +1,50 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Microsoft.VisualStudio.TextManager.Interop;
+using Microsoft.VisualStudio.Package;
+
+namespace Demo
+{
+ public class Methods : Microsoft.VisualStudio.Package.Methods
+ {
+ IList<Method> methods;
+ public Methods(IList<Method> methods)
+ {
+ this.methods = methods;
+ }
+
+ public override int GetCount()
+ {
+ return methods.Count;
+ }
+
+ public override string GetName(int index)
+ {
+ return methods[index].Name;
+ }
+
+ public override string GetDescription(int index)
+ {
+ return methods[index].Description;
+ }
+
+ public override string GetType(int index)
+ {
+ return methods[index].Type;
+ }
+
+ public override int GetParameterCount(int index)
+ {
+ return (methods[index].Parameters == null) ? 0 : methods[index].Parameters.Count;
+ }
+
+ public override void GetParameterInfo(int index, int paramIndex, out string name, out string display, out string description)
+ {
+ Parameter parameter = methods[index].Parameters[paramIndex];
+ name = parameter.Name;
+ display = parameter.Display;
+ description = parameter.Description;
+ }
+ }
+} \ No newline at end of file