Package cli.System

Examples of cli.System.Type


    private static long get(String propertyName)
    {
        Assembly asm = Assembly.LoadWithPartialName("Microsoft.VisualBasic");
        if (asm != null)
        {
            Type type = asm.GetType("Microsoft.VisualBasic.Devices.ComputerInfo");
            if (type != null)
            {
                PropertyInfo property = type.GetProperty(propertyName);
                if (property != null)
                {
                    Object obj = Activator.CreateInstance(type);
                    try
                    {
View Full Code Here


final class MonoUtils
{
    static String unameProperty(String field)
    {
        Type syscallType = Type.GetType("Mono.Unix.Native.Syscall, Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756");
        Type utsnameType = Type.GetType("Mono.Unix.Native.Utsname, Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756");
  if (syscallType != null && utsnameType != null)
  {
      Object[] arg = new Object[] { Activator.CreateInstance(utsnameType) };
      MethodInfo uname = syscallType.GetMethod("uname", new Type[] { utsnameType.MakeByRefType() });
      FieldInfo fi = utsnameType.GetField(field);
      if (uname != null && fi != null)
      {
    uname.Invoke(null, arg);
    return (String)fi.GetValue(arg[0]);
      }
View Full Code Here

      Class GetClass() {
    if (method == null) {
        // this happens if a native thread attaches and calls back into Java
        return null;
    }
    Type type = method.get_DeclaringType();
    if (type == null) {
        // TODO we probably should return a class corresponding to <Module>
        throw new InternalError();
    }
    return ikvm.runtime.Util.getClassFromTypeHandle(type.get_TypeHandle());
      }
      ClassLoader GetClassLoader() {
    if (method == null) {
        // this happens if a native thread attaches and calls back into Java
        return null;
View Full Code Here

TOP

Related Classes of cli.System.Type

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.