예제 #1
0
        /// <summary>
        /// Gets a data transfer object of the internal state of properties
        /// </summary>
        /// <returns></returns>
        public SigC GetInternalStateFields()
        {
            SigC v = new SigC();

            FieldInfo[] fields = v.GetType().GetFields();
            foreach (FieldInfo p in fields)
            {
                FieldInfo v1 = GetType().GetFields().FirstOrDefault(n => n.Name == p.Name);

                if (v1 != null)
                {
                    p.SetValue(v, v1.GetValue(this));
                }
            }
            return(v);
        }
예제 #2
0
        /// <summary>
        /// Gets a data transfer object of the internal state of properties
        /// </summary>
        /// <returns></returns>
        public SigC GetInternalStateProperties()
        {
            SigC v = new SigC();

            PropertyInfo[] properties = v.GetType().GetProperties();
            foreach (PropertyInfo p in properties)
            {
                PropertyInfo v1 = GetType().GetProperties().FirstOrDefault(n => n.Name == p.Name);

                var setmethod = p.SetMethod;
                if (setmethod != null)
                {
                    p.SetValue(v, v1.GetValue(this));
                }
            }
            return(v);
        }
예제 #3
0
파일: Sig8.cs 프로젝트: bizcad/LeanITrend
        /// <summary>
        /// Gets a data transfer object of the internal state of properties 
        /// </summary>
        /// <returns></returns>
        public SigC GetInternalStateProperties()
        {
            SigC v = new SigC();

            PropertyInfo[] properties = v.GetType().GetProperties();
            foreach (PropertyInfo p in properties)
            {

                PropertyInfo v1 = GetType().GetProperties().FirstOrDefault(n => n.Name == p.Name);

                var setmethod = p.SetMethod;
                if (setmethod != null)
                    p.SetValue(v, v1.GetValue(this));

            }
            return v;
        }
예제 #4
0
파일: Sig8.cs 프로젝트: bizcad/LeanITrend
        /// <summary>
        /// Gets a data transfer object of the internal state of properties 
        /// </summary>
        /// <returns></returns>
        public SigC GetInternalStateFields()
        {
            SigC v = new SigC();

            FieldInfo[] fields = v.GetType().GetFields();
            foreach (FieldInfo p in fields)
            {

                FieldInfo v1 = GetType().GetFields().FirstOrDefault(n => n.Name == p.Name);

                if (v1 != null) p.SetValue(v, v1.GetValue(this));
            }
            return v;
        }