public TupleHelper(string recordName, string item1Name, string item2Name)
 {
     m_recordName  = recordName;
     m_item1Name   = item1Name;
     m_item2Name   = item2Name;
     m_serializeT1 = TypeIO.Create <T1>(item1Name, false);
     m_serializeT2 = TypeIO.Create <T2>(item2Name, false);
 }
Beispiel #2
0
            public FieldWrite2(MemberInfo member, string recordName)
            {
                RecordName = recordName;
                if (member is PropertyInfo info)
                {
                    m_set = info.CompileSetter <T>();
                    m_get = info.CompileGetter <T>();
                }
                else if (member is FieldInfo fieldInfo)
                {
                    m_set = ((FieldInfo)member).CompileSetter <T>();
                    m_get = fieldInfo.CompileGetter <T>();
                }
                else
                {
                    throw new NotSupportedException();
                }

                m_io = TypeIO.Create <T>(recordName, false);
            }
Beispiel #3
0
 public NullableSerializationMethod(string recordName)
 {
     m_serializeT = TypeIO.Create <T>(recordName, false);
 }
 public EnumerableIOType(string recordName, Func <T[], TEnum> castToType)
 {
     m_recordName = recordName;
     m_castToType = castToType;
     m_serializeT = TypeIO.Create <T>("Item", false);
 }