Exemple #1
0
        private void CreateProxyFuncs()
        {
            MethodInfo[] methods = Type.GetMethods(SEARCH_TYPE);
            for (int i = 0; i < methods.Length; i++)
            {
                var method            = methods[i];
                ZXParseAttribute attr = GetAttribute(method);

                // Add The Method
                if (attr != null)
                {
                    // If There Is No String, This Is Not A Proxy
                    if (attr.Key == null)
                    {
                        continue;
                    }
                    ZXPFunc v = new ZXPFunc(attr.Key, method);
                    Funcs.Add(v);
                    FuncsDict[v.Key] = v;
                }
                else
                {
                    ZXPFunc v = new ZXPFunc(method.Name, method);
                    Funcs.Add(v);
                    FuncsDict[v.Key] = v;
                }
            }
        }
Exemple #2
0
        private void CreateProxyProps()
        {
            PropertyInfo[] props = Type.GetProperties(SEARCH_TYPE);
            for (int i = 0; i < props.Length; i++)
            {
                var data = props[i];
                ZXParseAttribute attr = GetAttribute(data);

                // Add The Property
                if (attr != null)
                {
                    // If There Is No String, This Is Not A Proxy
                    if (attr.Key == null)
                    {
                        continue;
                    }
                    ZXPDatum v = new ZXPDatum(attr.Key, data);
                    Data.Add(v);
                    DataDict[v.Key] = v;
                }
                else
                {
                    ZXPDatum v = new ZXPDatum(data.Name, data);
                    Data.Add(v);
                    DataDict[v.Key] = v;
                }
            }
        }