Exemplo n.º 1
0
 internal void RegisterPhasesInternal()
 {
     try
     {
         RegisterPhases();
     }
     catch (Exception e)
     {
         DimensionKeeperMod.LogMessage($"{nameof(RegisterPhasesInternal)} throw an error {e}");
     }
 }
Exemplo n.º 2
0
 void IDimensionInjector.Load(DimensionEntity dimension)
 {
     for (var i = 0; i < Phases.Count; i++)
     {
         try
         {
             Phases[i].ExecuteLoadPhaseInternal(dimension);
         }
         catch (Exception e)
         {
             DimensionKeeperMod.LogMessage($"{nameof(IDimensionInjector.Load)} with {dimension} throw an error {e}");
         }
     }
 }
Exemplo n.º 3
0
        internal static void ClearDimension(DimensionEntity entity)
        {
            if (!ValidateDimension(entity))
            {
                return;
            }

            try
            {
                RegisteredDimension.GetInjector(entity.Type).Clear(entity);
            }
            catch (Exception e)
            {
                DimensionKeeperMod.LogMessage($"{nameof(ClearDimension)} with {entity} throw an error {e}");
            }
        }
Exemplo n.º 4
0
        internal static void SynchronizeDimension(DimensionEntity entity, bool needSave = true)
        {
            if (!ValidateDimension(entity))
            {
                return;
            }

            try
            {
                RegisteredDimension.GetInjector(entity.Type).Synchronize(entity);

                if (needSave)
                {
                    RegisteredDimension.GetStorage(entity.Type).SaveInternal(entity);
                }
            }
            catch (Exception e)
            {
                DimensionKeeperMod.LogMessage($"{nameof(SynchronizeDimension)} with {entity} throw an error {e}");
            }
        }