Ejemplo n.º 1
0
        public void SyncFromBuffer(byte[] buffer)
        {
            KeyedDataLibrary keyedDataLibrary;

            keyedDataLibrary = KeyedDataLibrary.Deserialize(buffer);
            SyncFromKeyedLibrary(keyedDataLibrary);
        }
Ejemplo n.º 2
0
        public void SyncToBuffer(out byte[] buffer)
        {
            KeyedDataLibrary keyedDataLibrary;

            keyedDataLibrary = new KeyedDataLibrary();
            SyncToKeyedLibrary(keyedDataLibrary);
            buffer = KeyedDataLibrary.Serialize(keyedDataLibrary);
        }
Ejemplo n.º 3
0
 public void SyncToKeyedLibrary(KeyedDataLibrary keyedLibrary)
 {
     if (keyedLibrary != null)
     {
         foreach (var pair in Library)
         {
             keyedLibrary[pair.Key] = pair.Variable.ObjectValue;
         }
     }
 }
Ejemplo n.º 4
0
 public void SyncFromKeyedLibrary(KeyedDataLibrary keyedLibrary)
 {
     if (keyedLibrary != null)
     {
         foreach (var pair in Library)
         {
             if (keyedLibrary.Contains(pair.Key))
             {
                 pair.Variable.ObjectValue = keyedLibrary.GetValue(pair.Key);
             }
         }
     }
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Generates a new KeyedDataLibrary based on the defaults of the Variable library.
        /// </summary>
        /// <returns></returns>
        public KeyedDataLibrary CreateNewKeyedDataLibrary(bool applyDefaults)
        {
            KeyedDataLibrary n = new KeyedDataLibrary();

            foreach (var pair in Library)
            {
                n[pair.Key] = pair.Default.ObjectValue;
                if (applyDefaults)
                {
                    pair.Variable.ObjectValue = pair.Default.ObjectValue;
                }
            }
            return(n);
        }
Ejemplo n.º 6
0
 public void SyncFromKeyedLibrary(KeyedDataLibrary keyedLibrary)
 {
     ActiveDataLibrary.SyncFromKeyedLibrary(keyedLibrary);
 }