Tobias Bohnen avatar Tobias Bohnen committed 4bdb0c9

* moved CgEnums methods to Cg

Comments (0)

Files changed (3)

 
         #region Public Static Methods
 
+        public static Behavior GetBehavior(string behaviorString)
+        {
+            return NativeMethods.cgGetBehavior(behaviorString);
+        }
+
+        public static string GetBehavior(Behavior behavior)
+        {
+            return Marshal.PtrToStringAnsi(NativeMethods.cgGetBehaviorString(behavior));
+        }
+
+        public static Domain GetDomain(string domainString)
+        {
+            return NativeMethods.cgGetDomain(domainString);
+        }
+
+        public static string GetDomain(Domain domain)
+        {
+            return Marshal.PtrToStringAnsi(NativeMethods.cgGetDomainString(domain));
+        }
+
+        public static int GetEnum(string enumString)
+        {
+            return NativeMethods.cgGetEnum(enumString);
+        }
+
+        public static string GetEnum(int @enum)
+        {
+            return Marshal.PtrToStringAnsi(NativeMethods.cgGetEnumString(@enum));
+        }
+
+        public static string GetError(ErrorType error)
+        {
+            return Marshal.PtrToStringAnsi(NativeMethods.cgGetErrorString(error));
+        }
+
         public static ErrorType GetError()
         {
             return NativeMethods.cgGetError();
             return NativeMethods.cgGetMatrixSize(type, out nrows, out ncols);
         }
 
+        public static ParameterClass GetParameterClassEnum(string pString)
+        {
+            return NativeMethods.cgGetParameterClassEnum(pString);
+        }
+
+        public static string GetParameterClassString(ParameterClass pc)
+        {
+            return Marshal.PtrToStringAnsi(NativeMethods.cgGetParameterClassString(pc));
+        }
+
         public static ParameterType GetParentType(ParameterType type, int index)
         {
             return NativeMethods.cgGetParentType(type, index);
             return NativeMethods.cgGetNumParentTypes(type);
         }
 
+        public static ProfileType GetProfile(string profile)
+        {
+            return NativeMethods.cgGetProfile(profile);
+        }
+
+        public static string GetProfile(ProfileType profile)
+        {
+            return Marshal.PtrToStringAnsi(NativeMethods.cgGetProfileString(profile));
+        }
+
         public static Domain GetProfileDomain(ProfileType profile)
         {
             return NativeMethods.cgGetProfileDomain(profile);
             return NativeMethods.cgGetProfileProperty(profile, query);
         }
 
+        public static ProfileType GetProfileSibling(ProfileType profile, Domain domain)
+        {
+            return NativeMethods.cgGetProfileSibling(profile, domain);
+        }
+
         public static int GetProgramBufferMaxIndex(ProfileType profile)
         {
             return NativeMethods.cgGetProgramBufferMaxIndex(profile);
             return NativeMethods.cgGetProgramBufferMaxSize(profile);
         }
 
+        public static ResourceType GetResource(string resourceName)
+        {
+            return NativeMethods.cgGetResource(resourceName);
+        }
+
+        public static string GetResource(ResourceType resource)
+        {
+            return Marshal.PtrToStringAnsi(NativeMethods.cgGetResourceString(resource));
+        }
+
+        public static string GetString(CgAll sname)
+        {
+            return Marshal.PtrToStringAnsi(NativeMethods.cgGetString(sname));
+        }
+
         public static ProfileType GetSupportedProfile(int index)
         {
             return NativeMethods.cgGetSupportedProfile(index);
         }
 
+        public static ParameterType GetType(string typeString)
+        {
+            return NativeMethods.cgGetType(typeString);
+        }
+
+        public static string GetType(ParameterType type)
+        {
+            return Marshal.PtrToStringAnsi(NativeMethods.cgGetTypeString(type));
+        }
+
+        public static ParameterType GetTypeBase(ParameterType type)
+        {
+            return NativeMethods.cgGetTypeBase(type);
+        }
+
+        public static ParameterClass GetTypeClass(ParameterType type)
+        {
+            return NativeMethods.cgGetTypeClass(type);
+        }
+
         public static bool GetTypeSizes(ParameterType type, out int nrows, out int ncols)
         {
             return NativeMethods.cgGetTypeSizes(type, out nrows, out ncols);
     }
 
     #endregion Enumerations
-
-    public static class CgEnums
-    {
-        #region Methods
-
-        #region Public Static Methods
-
-        public static Behavior GetBehavior(string behaviorString)
-        {
-            return NativeMethods.cgGetBehavior(behaviorString);
-        }
-
-        public static string GetBehavior(Behavior behavior)
-        {
-            return Marshal.PtrToStringAnsi(NativeMethods.cgGetBehaviorString(behavior));
-        }
-
-        public static Domain GetDomain(string domainString)
-        {
-            return NativeMethods.cgGetDomain(domainString);
-        }
-
-        public static string GetDomain(Domain domain)
-        {
-            return Marshal.PtrToStringAnsi(NativeMethods.cgGetDomainString(domain));
-        }
-
-        public static int GetEnum(string enumString)
-        {
-            return NativeMethods.cgGetEnum(enumString);
-        }
-
-        public static string GetEnum(int @enum)
-        {
-            return Marshal.PtrToStringAnsi(NativeMethods.cgGetEnumString(@enum));
-        }
-
-        public static string GetError(ErrorType error)
-        {
-            return Marshal.PtrToStringAnsi(NativeMethods.cgGetErrorString(error));
-        }
-
-        public static ParameterClass GetParameterClassEnum(string pString)
-        {
-            return NativeMethods.cgGetParameterClassEnum(pString);
-        }
-
-        public static string GetParameterClassString(ParameterClass pc)
-        {
-            return Marshal.PtrToStringAnsi(NativeMethods.cgGetParameterClassString(pc));
-        }
-
-        public static ProfileType GetProfile(string profile)
-        {
-            return NativeMethods.cgGetProfile(profile);
-        }
-
-        public static string GetProfile(ProfileType profile)
-        {
-            return Marshal.PtrToStringAnsi(NativeMethods.cgGetProfileString(profile));
-        }
-
-        public static ProfileType GetProfileSibling(ProfileType profile, Domain domain)
-        {
-            return NativeMethods.cgGetProfileSibling(profile, domain);
-        }
-
-        public static ResourceType GetResource(string resourceName)
-        {
-            return NativeMethods.cgGetResource(resourceName);
-        }
-
-        public static string GetResource(ResourceType resource)
-        {
-            return Marshal.PtrToStringAnsi(NativeMethods.cgGetResourceString(resource));
-        }
-
-        public static string GetString(CgAll sname)
-        {
-            return Marshal.PtrToStringAnsi(NativeMethods.cgGetString(sname));
-        }
-
-        public static ParameterType GetType(string typeString)
-        {
-            return NativeMethods.cgGetType(typeString);
-        }
-
-        public static string GetType(ParameterType type)
-        {
-            return Marshal.PtrToStringAnsi(NativeMethods.cgGetTypeString(type));
-        }
-
-        public static ParameterType GetTypeBase(ParameterType type)
-        {
-            return NativeMethods.cgGetTypeBase(type);
-        }
-
-        public static ParameterClass GetTypeClass(ParameterType type)
-        {
-            return NativeMethods.cgGetTypeClass(type);
-        }
-
-        #endregion Public Static Methods
-
-        #endregion Methods
-    }
 }

CgNet/ErrorEventArgs.cs

         public ErrorEventArgs(ErrorType errorType)
         {
             this.ErrorType = errorType;
-            this.ErrorString = CgEnums.GetError(errorType);
+            this.ErrorString = Cg.GetError(errorType);
         }
 
         #endregion Constructors
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.