Exemple #1
0
 public static void Save(IStateResourceAccess <TState> stateResourceAccess)
 {
     if (stateResourceAccess == null)
     {
         throw new ArgumentNullException(nameof(stateResourceAccess));
     }
     AbstractPropertyState <TState, TElement, TProperty> .Persistence.Save(stateResourceAccess);
 }
Exemple #2
0
 internal void Save(IStateResourceAccess <TState> stateResourceAccess)
 {
     if (stateResourceAccess == null)
     {
         throw new ArgumentNullException(nameof(stateResourceAccess));
     }
     stateResourceAccess.Save(m_State);
 }
Exemple #3
0
 public static void Save(IStateResourceAccess <PersistenceState> stateResourceAccess)
 {
     if (stateResourceAccess == null)
     {
         throw new ArgumentNullException(nameof(stateResourceAccess));
     }
     GenericPropertyStateHelper <PersistenceState, PersistenceElement, PersistenceProperty> .Save(stateResourceAccess);
 }
Exemple #4
0
#pragma warning disable CA1000 // Do not declare static members on generic types
        public static void Load(
            IStateResourceAccess <TState> stateResourceAccess,
            Func <DependencyObject, AbstractPropertyState <TState, TElement, TProperty> > addPropertyState)
        {
            if (stateResourceAccess == null)
            {
                throw new ArgumentNullException(nameof(stateResourceAccess));
            }
            AbstractPropertyState <TState, TElement, TProperty> .Persistence.Load(stateResourceAccess);

            s_AddPropertyState = addPropertyState ?? throw new ArgumentNullException(nameof(addPropertyState));
        }
Exemple #5
0
 internal void Load(IStateResourceAccess <TState> stateResourceAccess)
 {
     if (stateResourceAccess == null)
     {
         throw new ArgumentNullException(nameof(stateResourceAccess));
     }
     try
     {
         m_State = stateResourceAccess.Load() ?? new TState();
     }
     finally
     {
         InitializeLookupTables();
     }
 }