Esempio n. 1
0
    public System.Object initializeClass(string className, string revicedObj)
    {
        // System.Object retunedClass = new System.Object();
        baseClass retunedClass = new baseClass();

        try {
            Type elementType = Type.GetType(className, true);
            if (elementType != null)
            {
                retunedClass = (baseClass)(Activator.CreateInstance(elementType));
                string feedback = retunedClass.init(revicedObj);
                Debug.Log(feedback);
            }
        }
        catch (Exception ex)
        {
            Debug.Log(ex.Message);
            Debug.Log("The client request this class, but dosen't exist!");
        }

        return(retunedClass);
    }
Esempio n. 2
0
    public System.Object initializeCass(string className, string revicedObj)
    {
        // System.Object retunedClass = new System.Object();
        baseClass retunedClass = new baseClass();

        try {
            Type elementType = Type.GetType(className, true);

            if (elementType != null)
            {
                retunedClass = (baseClass) (Activator.CreateInstance(elementType));
                string feedback = retunedClass.init(revicedObj);
                Debug.Log(feedback);
            }
        }
        catch (Exception ex)
        {
            Debug.Log(ex.Message);
            Debug.Log("The client request this class, but dosen't exist!");
        }

        return retunedClass;
    }