public override void ShowTypeView(Type type, object instance = null)
        {
            if (type is null)
            {
                return;
            }
            m_InstancePropertys = new List <PropertyInfo>(PropertyHelpers.GetInstancePropertys(type));
            m_InstancePropertys.Sort(Comparison);

            m_StaticPropertys = new List <PropertyInfo>(PropertyHelpers.GetStaticPropertys(type));
            m_StaticPropertys.Sort(Comparison);

            base.ShowTypeView(type, instance);
        }
Beispiel #2
0
        static void SingletonClass(
            ref ClusterDict classCluster,
            ClusterSubDict allClass)
        {
            classCluster.Add("Singleton##Class", NewClassDict());

            bool added = false;

            foreach (var class2type in allClass)
            {
                added = false;

                if (class2type.Value.IsEnum)
                {
                    continue;
                }

                PropertyInfo[] propertyInfos = PropertyHelpers.GetStaticPropertys(class2type.Value);
                FieldInfo[]    fieldInfos    = FieldHelpers.GetStaticFields(class2type.Value);

                //Seach propertys singleton
                foreach (PropertyInfo propertyInfo in propertyInfos)
                {
                    if (propertyInfo.PropertyType.FullName == class2type.Value.FullName)
                    {
                        classCluster["Singleton##Class"].Add(class2type.Key, class2type.Value);
                        added = true;
                        break;
                    }
                }

                if (added)
                {
                    continue;
                }

                //Seach fields singleton
                foreach (FieldInfo fieldInfo in fieldInfos)
                {
                    if (fieldInfo.FieldType.FullName == class2type.Value.FullName)
                    {
                        classCluster["Singleton##Class"].Add(class2type.Key, class2type.Value);
                        break;
                    }
                }
            }
        }