예제 #1
0
        //public string DTOSchemaCode
        //{
        //    get;
        //    private set;
        //}


        #region 初始化

        private void Init()
        {
            if (this.ClassAttribute != null)
            {
                return;                              //已初始化
            }
            this.ClassAttribute = DTOClassAttribute.GetAttribute(_classType);
            if (SerializationMethodHelper.IsPrimitive(this.ClassType) || this.ClassType == typeof(DTObject))
            {
                //this.DTOSchemaCode = string.Empty;
            }
            else
            {
                _memberInfos       = BuildMembers();
                _serializeMethod   = CreateSerializeMethod();
                _deserializeMethod = CreateDeserializeMethod();
                // this.DTOSchemaCode = "{}";
            }
        }
예제 #2
0
 protected override DTOClassAttribute GetClassAttribute(Type classType)
 {
     return(DTOClassAttribute.GetAttribute(classType));
 }