Index: experimental/visual_studio_plugin/src/MsAd7.BaseImpl/ComUtils.cs |
diff --git a/experimental/visual_studio_plugin/src/MsAd7.BaseImpl/ComUtils.cs b/experimental/visual_studio_plugin/src/MsAd7.BaseImpl/ComUtils.cs |
deleted file mode 100644 |
index c1706345093dfd4c8b489124023bb8716b87718d..0000000000000000000000000000000000000000 |
--- a/experimental/visual_studio_plugin/src/MsAd7.BaseImpl/ComUtils.cs |
+++ /dev/null |
@@ -1,47 +0,0 @@ |
-using System; |
-using System.Collections.Generic; |
-using System.Linq; |
-using System.Runtime.InteropServices; |
-using System.Text; |
- |
-namespace Google.MsAd7.BaseImpl |
-{ |
- public class ComUtils |
- { |
- public static Guid GuidOf(Type t) { |
- Guid result = Guid.Empty; |
- |
- object[] attrs = t.GetCustomAttributes(typeof (InheritGuidAttribute), |
- false); |
- if(attrs.Length > 0) { |
- result = GuidOf(((InheritGuidAttribute) attrs[0]).InheritFrom); |
- } |
- |
- attrs = t.GetCustomAttributes(typeof (GuidAttribute),false); |
- if (attrs.Length > 0) { |
- result = new Guid(((GuidAttribute) attrs[0]).Value); |
- } |
- return result; |
- } |
- |
- public static Guid GuidOf(object o) { |
- return GuidOf(o.GetType()); |
- } |
- |
- public static void RequireOk(int hr) { |
- if (hr != 0) { |
- throw new COMException("Error", hr); |
- } |
- } |
- } |
- |
- public class InheritGuidAttribute : Attribute { |
- public InheritGuidAttribute(Type inheritFrom) { |
- InheritFrom = inheritFrom; |
- } |
- |
- public Type InheritFrom { get; set; } |
- } |
- |
- |
-} |