示例#1
0
        public virtual int GetHashCode(IGlobalGetter item)
        {
            var hash = new HashCode();

            hash.Add(base.GetHashCode());
            return(hash.ToHashCode());
        }
示例#2
0
 public virtual Global Duplicate(
     IGlobalGetter item,
     FormKey formKey,
     TranslationCrystal?copyMask)
 {
     throw new NotImplementedException();
 }
示例#3
0
 public virtual void Write(
     MutagenWriter writer,
     IGlobalGetter item,
     RecordTypeConverter?recordTypeConverter = null)
 {
     using (HeaderExport.Header(
                writer: writer,
                record: recordTypeConverter.ConvertToCustom(RecordTypes.GLOB),
                type: Mutagen.Bethesda.Binary.ObjectType.Record))
     {
         try
         {
             OblivionMajorRecordBinaryWriteTranslation.WriteEmbedded(
                 item: item,
                 writer: writer);
             writer.MetaData.FormVersion = item.FormVersion;
             WriteRecordTypes(
                 item: item,
                 writer: writer,
                 recordTypeConverter: recordTypeConverter);
             writer.MetaData.FormVersion = null;
         }
         catch (Exception ex)
         {
             throw RecordException.Factory(ex, item.FormKey, item.EditorID);
         }
     }
 }
示例#4
0
 public virtual void Write(
     MutagenWriter writer,
     IGlobalGetter item,
     TypedWriteParams?translationParams = null)
 {
     using (HeaderExport.Record(
                writer: writer,
                record: translationParams.ConvertToCustom(RecordTypes.GLOB)))
     {
         try
         {
             OblivionMajorRecordBinaryWriteTranslation.WriteEmbedded(
                 item: item,
                 writer: writer);
             writer.MetaData.FormVersion = item.FormVersion;
             WriteRecordTypes(
                 item: item,
                 writer: writer,
                 translationParams: translationParams);
             writer.MetaData.FormVersion = null;
         }
         catch (Exception ex)
         {
             throw RecordException.Enrich(ex, item);
         }
     }
 }
示例#5
0
 public static bool Equals(
     this IGlobalGetter item,
     IGlobalGetter rhs)
 {
     return(((GlobalCommon)((IGlobalGetter)item).CommonInstance() !).Equals(
                lhs: item,
                rhs: rhs));
 }
示例#6
0
 public IEnumerable <FormKey> GetLinkFormKeys(IGlobalGetter obj)
 {
     foreach (var item in base.GetLinkFormKeys(obj))
     {
         yield return(item);
     }
     yield break;
 }
示例#7
0
 public static void WriteBinaryTypeChar(
     MutagenWriter writer,
     IGlobalGetter item)
 {
     WriteBinaryTypeCharCustom(
         writer: writer,
         item: item);
 }
示例#8
0
 public IEnumerable <FormLinkInformation> GetContainedFormLinks(IGlobalGetter obj)
 {
     foreach (var item in base.GetContainedFormLinks(obj))
     {
         yield return(item);
     }
     yield break;
 }
示例#9
0
 public static Global DeepCopy(
     this IGlobalGetter item,
     Global.TranslationMask?copyMask = null)
 {
     return(((GlobalSetterTranslationCommon)((IGlobalGetter)item).CommonSetterTranslationInstance() !).DeepCopy(
                item: item,
                copyMask: copyMask));
 }
示例#10
0
文件: Global.cs 项目: erri120/Mutagen
 public static partial void WriteBinaryTypeCharCustom(
     MutagenWriter writer,
     IGlobalGetter item)
 {
     CharBinaryTranslation <MutagenFrame, MutagenWriter> .Instance.Write(
         writer,
         item.TypeChar,
         header : RecordTypes.FNAM);
 }
示例#11
0
 static partial void WriteBinaryTypeCharCustom(
     MutagenWriter writer,
     IGlobalGetter item)
 {
     Mutagen.Bethesda.Binary.CharBinaryTranslation.Instance.Write(
         writer,
         item.TypeChar,
         header: RecordTypes.FNAM);
 }
示例#12
0
 public static Global DeepCopy(
     this IGlobalGetter item,
     ErrorMaskBuilder?errorMask,
     TranslationCrystal?copyMask = null)
 {
     return(((GlobalSetterTranslationCommon)((IGlobalGetter)item).CommonSetterTranslationInstance() !).DeepCopy(
                item: item,
                copyMask: copyMask,
                errorMask: errorMask));
 }
示例#13
0
 public static string ToString(
     this IGlobalGetter item,
     string?name = null,
     Global.Mask <bool>?printMask = null)
 {
     return(((GlobalCommon)((IGlobalGetter)item).CommonInstance() !).ToString(
                item: item,
                name: name,
                printMask: printMask));
 }
示例#14
0
 protected static void ToStringFields(
     IGlobalGetter item,
     FileGeneration fg,
     Global.Mask <bool>?printMask = null)
 {
     OblivionMajorRecordCommon.ToStringFields(
         item: item,
         fg: fg,
         printMask: printMask);
 }
示例#15
0
 public static bool Equals(
     this IGlobalGetter item,
     IGlobalGetter rhs,
     Global.TranslationMask?equalsMask = null)
 {
     return(((GlobalCommon)((IGlobalGetter)item).CommonInstance() !).Equals(
                lhs: item,
                rhs: rhs,
                crystal: equalsMask?.GetCrystal()));
 }
示例#16
0
 public static Global.Mask <bool> GetEqualsMask(
     this IGlobalGetter item,
     IGlobalGetter rhs,
     EqualsMaskHelper.Include include = EqualsMaskHelper.Include.All)
 {
     return(((GlobalCommon)((IGlobalGetter)item).CommonInstance() !).GetEqualsMask(
                item: item,
                rhs: rhs,
                include: include));
 }
示例#17
0
 public static Global Duplicate(
     this IGlobalGetter item,
     FormKey formKey,
     Global.TranslationMask?copyMask = null)
 {
     return(((GlobalCommon)((IGlobalGetter)item).CommonInstance() !).Duplicate(
                item: item,
                formKey: formKey,
                copyMask: copyMask?.GetCrystal()));
 }
示例#18
0
 public static void ToString(
     this IGlobalGetter item,
     FileGeneration fg,
     string?name = null,
     Global.Mask <bool>?printMask = null)
 {
     ((GlobalCommon)((IGlobalGetter)item).CommonInstance() !).ToString(
         item: item,
         fg: fg,
         name: name,
         printMask: printMask);
 }
示例#19
0
 public void FillEqualsMask(
     IGlobalGetter item,
     IGlobalGetter rhs,
     Global.Mask <bool> ret,
     EqualsMaskHelper.Include include = EqualsMaskHelper.Include.All)
 {
     if (rhs == null)
     {
         return;
     }
     base.FillEqualsMask(item, rhs, ret, include);
 }
示例#20
0
 public static void DeepCopyIn(
     this IGlobalInternal lhs,
     IGlobalGetter rhs,
     ErrorMaskBuilder?errorMask,
     TranslationCrystal?copyMask)
 {
     ((GlobalSetterTranslationCommon)((IGlobalGetter)lhs).CommonSetterTranslationInstance() !).DeepCopyIn(
         item: lhs,
         rhs: rhs,
         errorMask: errorMask,
         copyMask: copyMask,
         deepCopy: false);
 }
示例#21
0
 public static void WriteRecordTypes(
     IGlobalGetter item,
     MutagenWriter writer,
     TypedWriteParams?translationParams)
 {
     MajorRecordBinaryWriteTranslation.WriteRecordTypes(
         item: item,
         writer: writer,
         translationParams: translationParams);
     GlobalBinaryWriteTranslation.WriteBinaryTypeChar(
         writer: writer,
         item: item);
 }
示例#22
0
 public static void WriteRecordTypes(
     IGlobalGetter item,
     MutagenWriter writer,
     RecordTypeConverter?recordTypeConverter)
 {
     MajorRecordBinaryWriteTranslation.WriteRecordTypes(
         item: item,
         writer: writer,
         recordTypeConverter: recordTypeConverter);
     GlobalBinaryWriteTranslation.WriteBinaryTypeChar(
         writer: writer,
         item: item);
 }
示例#23
0
 public static partial void WriteBinaryTypeCharCustom(
     MutagenWriter writer,
     IGlobalGetter item)
 {
     if (item is not IGlobalFloatGetter f ||
         !f.NoTypeDeclaration)
     {
         CharBinaryTranslation <MutagenFrame, MutagenWriter> .Instance.Write(
             writer,
             item.TypeChar,
             header : RecordTypes.FNAM);
     }
 }
示例#24
0
 public virtual void DeepCopyIn(
     IGlobal item,
     IGlobalGetter rhs,
     ErrorMaskBuilder?errorMask,
     TranslationCrystal?copyMask,
     bool deepCopy)
 {
     base.DeepCopyIn(
         (IOblivionMajorRecord)item,
         (IOblivionMajorRecordGetter)rhs,
         errorMask,
         copyMask,
         deepCopy: deepCopy);
 }
示例#25
0
 public virtual void DeepCopyIn(
     IGlobalInternal item,
     IGlobalGetter rhs,
     ErrorMaskBuilder?errorMask,
     TranslationCrystal?copyMask,
     bool deepCopy)
 {
     base.DeepCopyIn(
         item,
         rhs,
         errorMask,
         copyMask,
         deepCopy: deepCopy);
 }
示例#26
0
        public Global DeepCopy(
            IGlobalGetter item,
            Global.TranslationMask?copyMask = null)
        {
            Global ret = (Global)((GlobalCommon)((IGlobalGetter)item).CommonInstance() !).GetNew();

            ((GlobalSetterTranslationCommon)((IGlobalGetter)ret).CommonSetterTranslationInstance() !).DeepCopyIn(
                item: ret,
                rhs: item,
                errorMask: null,
                copyMask: copyMask?.GetCrystal(),
                deepCopy: true);
            return(ret);
        }
示例#27
0
        public string ToString(
            IGlobalGetter item,
            string?name = null,
            Global.Mask <bool>?printMask = null)
        {
            var fg = new FileGeneration();

            ToString(
                item: item,
                fg: fg,
                name: name,
                printMask: printMask);
            return(fg.ToString());
        }
示例#28
0
        public Global.Mask <bool> GetEqualsMask(
            IGlobalGetter item,
            IGlobalGetter rhs,
            EqualsMaskHelper.Include include = EqualsMaskHelper.Include.All)
        {
            var ret = new Global.Mask <bool>(false);

            ((GlobalCommon)((IGlobalGetter)item).CommonInstance() !).FillEqualsMask(
                item: item,
                rhs: rhs,
                ret: ret,
                include: include);
            return(ret);
        }
示例#29
0
        public Global DeepCopy(
            IGlobalGetter item,
            ErrorMaskBuilder?errorMask,
            TranslationCrystal?copyMask = null)
        {
            Global ret = (Global)((GlobalCommon)((IGlobalGetter)item).CommonInstance() !).GetNew();

            ((GlobalSetterTranslationCommon)((IGlobalGetter)ret).CommonSetterTranslationInstance() !).DeepCopyIn(
                item: ret,
                rhs: item,
                errorMask: errorMask,
                copyMask: copyMask,
                deepCopy: true);
            return(ret);
        }
示例#30
0
        public static void DeepCopyIn(
            this IGlobalInternal lhs,
            IGlobalGetter rhs,
            out Global.ErrorMask errorMask,
            Global.TranslationMask?copyMask = null)
        {
            var errorMaskBuilder = new ErrorMaskBuilder();

            ((GlobalSetterTranslationCommon)((IGlobalGetter)lhs).CommonSetterTranslationInstance() !).DeepCopyIn(
                item: lhs,
                rhs: rhs,
                errorMask: errorMaskBuilder,
                copyMask: copyMask?.GetCrystal(),
                deepCopy: false);
            errorMask = Global.ErrorMask.Factory(errorMaskBuilder);
        }