Exemple #1
0
        public void EDIDLink_Resolve_Linked(LinkCacheTestTypes cacheType)
        {
            var mod    = new SkyrimMod(TestConstants.PluginModKey, SkyrimRelease.SkyrimLE);
            var effect = mod.MagicEffects.AddNew();

            effect.EditorID     = "LINK";
            var(style, package) = GetLinkCache(mod, cacheType);
            EDIDLink <IMagicEffect> link = new EDIDLink <IMagicEffect>(new RecordType("LINK"));

            Assert.Same(effect, link.TryResolve(package));
        }
 public bool Parse <T>(
     XElement node,
     out EDIDLink <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);
 }
        public bool Parse <T>(
            MutagenFrame reader,
            out EDIDLink <T> item,
            TypedParseParams?translationParams = null)
            where T : class, IMajorRecordGetter
        {
            if (!reader.TryCheckUpcomingRead(4, out var ex))
            {
                throw ex;
            }

            item = new EDIDLink <T>(HeaderTranslation.ReadNextRecordType(reader));
            return(true);
        }