Beispiel #1
0
 /// <summary>
 /// 对象成员复制
 /// </summary>
 /// <param name="value">目标对象</param>
 /// <param name="copyValue">被复制对象</param>
 /// <param name="filter">成员选择</param>
 /// <param name="memberMap">成员位图</param>
 public static valueType Copy(valueType value, valueType copyValue
                              , code.memberFilters filter = code.memberFilters.InstanceField, memberMap <valueType> memberMap = default(memberMap <valueType>))
 {
     if (isStruct)
     {
         return(memberGroup.CopyValue(value, copyValue, filter, memberMap));
     }
     else
     {
         if (value == null || copyValue == null)
         {
             log.Error.Throw(log.exceptionType.Null);
         }
         memberGroup.Copy(value, copyValue, filter, memberMap);
         return(value);
     }
 }
Beispiel #2
0
 /// <summary>
 /// 对象序列化
 /// </summary>
 /// <typeparam name="valueType">对象类型</typeparam>
 /// <param name="stream">内存数据流</param>
 /// <param name="value">数据对象</param>
 /// <param name="filter">成员选择,默认为公共字段成员</param>
 /// <param name="memberMap">成员位图</param>
 public static void Get <valueType>(unmanagedStream stream, valueType value
                                    , code.memberFilters filter = code.memberFilters.InstanceField, memberMap <valueType> memberMap = default(memberMap <valueType>))
 {
     dataSerialize <valueType> .Get(stream, value, filter, memberMap);
 }
Beispiel #3
0
 /// <summary>
 /// 序列化
 /// </summary>
 /// <param name="isReferenceMember">是否检测相同的引用成员</param>
 /// <param name="stream">序列化流</param>
 /// <param name="memberFilter">成员选择</param>
 protected serializer(bool isReferenceMember, unmanagedStream stream, code.memberFilters memberFilter)
     : base(isReferenceMember, stream, memberFilter)
 {
 }
Beispiel #4
0
 /// <summary>
 /// 对象序列化器
 /// </summary>
 /// <param name="isReferenceMember">是否检测相同的引用成员</param>
 /// <param name="stream">序列化流</param>
 /// <param name="memberFilter">成员选择</param>
 public reflectionDataSerializer(bool isReferenceMember, unmanagedStream stream, code.memberFilters memberFilter)
     : base(isReferenceMember, stream, memberFilter)
 {
 }