Example #1
0
 void SerializeOptionToggles <TDoc, TCursor>(IO.TagElementStream <TDoc, TCursor, string> s)
     where TDoc : class
     where TCursor : class
 {
     #region EngineOptions
     using (var bm = s.EnterCursorBookmarkOpt("EngineOptions", this, _obj => _obj.HasEngineOptionToggles)) if (bm.IsNotNull)
         {
             using (var bm2 = s.EnterCursorBookmarkOpt("Disabled", DisabledEngineOptions, Predicates.HasBits)) if (bm2.IsNotNull)
                 {
                     DisabledEngineOptions.Serialize(s, "Option", this, SerializeEngineOptionToggle);
                 }
             using (var bm2 = s.EnterCursorBookmarkOpt("Hidden", HiddenEngineOptions, Predicates.HasBits)) if (bm2.IsNotNull)
                 {
                     HiddenEngineOptions.Serialize(s, "Option", this, SerializeEngineOptionToggle);
                 }
         }
     #endregion
     #region UserOptions
     using (var bm = s.EnterCursorBookmarkOpt("UserOptions", this, _obj => _obj.HasUserOptionToggles)) if (bm.IsNotNull)
         {
             using (var bm2 = s.EnterCursorBookmarkOpt("Disabled", DisabledUserOptions, Predicates.HasBits)) if (bm2.IsNotNull)
                 {
                     DisabledUserOptions.Serialize(s, "Option", this, SerializeUserOptionToggle);
                 }
             using (var bm2 = s.EnterCursorBookmarkOpt("Hidden", HiddenUserOptions, Predicates.HasBits)) if (bm2.IsNotNull)
                 {
                     HiddenUserOptions.Serialize(s, "Option", this, SerializeUserOptionToggle);
                 }
         }
     #endregion
 }
Example #2
0
 protected void SerializeOptionToggles(IO.BitStream s)
 {
     DisabledEngineOptions.SerializeWords(s, Shell.EndianFormat.Little);
     HiddenEngineOptions.SerializeWords(s, Shell.EndianFormat.Little);
     DisabledUserOptions.SerializeWords(s, Shell.EndianFormat.Little);
     HiddenUserOptions.SerializeWords(s, Shell.EndianFormat.Little);
 }