public IObjectClass ObjectClass(object clazz)
        {
            string className = null;

            if (clazz is string)
            {
                className = (string)clazz;
            }
            else
            {
                IReflectClass claxx = ReflectorFor(clazz);
                if (claxx == null)
                {
                    return(null);
                }
                className = claxx.GetName();
            }
            if (ReflectPlatform.FullyQualifiedName(typeof(object)).Equals(className))
            {
                throw new ArgumentException("Configuration of the Object class is not supported."
                                            );
            }
            Hashtable4   xClasses = ExceptionalClasses();
            Config4Class c4c      = (Config4Class)xClasses.Get(className);

            if (c4c == null)
            {
                c4c = new Config4Class(this, className);
                xClasses.Put(className, c4c);
            }
            return(c4c);
        }
Exemple #2
0
        /// <summary>calling this method "method" will break C# conversion with the old converter
        ///     </summary>
        public static MethodInfo GetMethod(string className, string methodName, Type[] paramClasses
                                           )
        {
            Type clazz = ReflectPlatform.ForName(className);

            if (clazz == null)
            {
                return(null);
            }
            return(GetMethod(clazz, methodName, paramClasses));
        }
Exemple #3
0
 /// <exception cref="Sharpen.Lang.InstantiationException"></exception>
 /// <exception cref="System.MemberAccessException"></exception>
 private IObjectTranslator NewTranslatorFromPlatform(string translatorName)
 {
     return((IObjectTranslator)System.Activator.CreateInstance(ReflectPlatform.ForName
                                                                   (translatorName)));
 }
 public static object CreateInstance(string typeName)
 {
     return(ReflectPlatform.CreateInstance(ForName(typeName)));
 }