Пример #1
0
        public void AddUtilsMethod(string className, IEnumerable <PropertyInfo> propertyNames, UtilsStaticMethod type)
        {
            var x = new UtilsMethod(className, propertyNames);


            if ((type & UtilsStaticMethod.CloneFrom) == UtilsStaticMethod.CloneFrom)
            {
                Add(x.CloneFrom());
            }


            if ((type & UtilsStaticMethod.CompareTo) == UtilsStaticMethod.CompareTo)
            {
                Add(x.CompareTo());
            }


            if ((type & UtilsStaticMethod.CopyTo) == UtilsStaticMethod.CopyTo)
            {
                Add(x.CopyTo());
            }

            if ((type & UtilsStaticMethod.ToSimpleString) == UtilsStaticMethod.ToSimpleString)
            {
                Add(x.ToSimpleString());
            }
        }
Пример #2
0
        public void AddUtilsMethod(string className, IEnumerable <PropertyInfo> propertyNames, UtilsThisMethod type)
        {
            var x = new UtilsMethod(className, propertyNames);

            if ((type & UtilsThisMethod.Map) == UtilsThisMethod.Map)
            {
                Add(x.Map());
            }

            if ((type & UtilsThisMethod.Equals) == UtilsThisMethod.Equals)
            {
                Add(x.Equals());
            }

            if ((type & UtilsThisMethod.Clone) == UtilsThisMethod.Clone)
            {
                Add(x.Clone());
            }

            if ((type & UtilsThisMethod.Compare) == UtilsThisMethod.Compare)
            {
                Add(x.Compare());
            }

            if ((type & UtilsThisMethod.Copy) == UtilsThisMethod.Copy)
            {
                Add(x.Copy());
            }

            if ((type & UtilsThisMethod.GetHashCode) == UtilsThisMethod.GetHashCode)
            {
                Add(x._GetHashCode());
            }

            if ((type & UtilsThisMethod.ToDictionary) == UtilsThisMethod.ToDictionary)
            {
                Add(x.ToDictinary());
                Add(x.FromDictinary());
            }

            if ((type & UtilsThisMethod.ToString) == UtilsThisMethod.ToString)
            {
                Add(x._ToString_v2());
            }
        }