public void Write <T>(MutagenWriter writer, IEDIDLinkGetter <T> item)
     where T : class, IMajorRecordCommonGetter
 {
     this.Write(
         writer,
         item.EDID);
 }
 public void Write <M, T>(
     MutagenWriter writer,
     IEDIDLinkGetter <T> item,
     RecordType header)
     where T : class, IMajorRecordCommonGetter
 {
     this.Write(
         writer,
         item.EDID,
         header);
 }
 public bool Parse <T>(
     XElement node,
     out IEDIDLinkGetter <T> item,
     ErrorMaskBuilder?errorMask,
     TranslationCrystal?translationMask)
     where T : class, IMajorRecordCommonGetter
 {
     return(this.Parse(
                node: node,
                item: out item,
                errorMask: errorMask));
 }
        public bool Parse <T>(
            MutagenFrame reader,
            out IEDIDLinkGetter <T> item,
            RecordTypeConverter?recordTypeConverter = null)
            where T : class, IMajorRecordCommonGetter
        {
            if (!reader.TryCheckUpcomingRead(4, out var ex))
            {
                throw ex;
            }

            item = new EDIDLink <T>(HeaderTranslation.ReadNextRecordType(reader));
            return(true);
        }
 public bool Parse <T>(
     XElement node,
     out IEDIDLinkGetter <T> item,
     ErrorMaskBuilder?errorMask)
     where T : class, IMajorRecordCommonGetter
 {
     if (Parse(node, out RecordType id, errorMask))
     {
         item = new EDIDLink <T>(id);
         return(true);
     }
     item = new EDIDLink <T>();
     return(false);
 }
Beispiel #6
0
 /// <summary>
 /// Creates a new FormLinkNullable with the same type
 /// </summary>
 public static IEDIDLink <TMajor> AsSetter <TMajor>(this IEDIDLinkGetter <TMajor> link)
     where TMajor : class, IMajorRecordCommonGetter
 {
     return(new EDIDLink <TMajor>(link.EDID));
 }